stolyar wrote:

My comments

351^N leaves 1 with any positive N, when divided by 7

(350+1)*...*(350+1) all the multiplied members are divisible by 7, save for the last 1.

check out 352=350+2

N=2) (350+2)*(350+2) leaves 4 =7a+4

N=3) (7a+4)*(350+2) leaves 8, or actually 1, =7b+1

N=4) (7b+1)*(350+2) leaves 2, or =7c+2

N=5) (7c+2)*(350+2) leaves 4, or =7d+4

N=6) (7d+4)*(350+2) leaves 8, or actually 1

remainders (from N=2) go in the order of 4, 1, 2, 4, 1, 2, ...

so N=3 and N=6 both match

i agree

When 351^6 is divided by 7, the remainder will be 1^6 = 1.

When 352^6 is divided by 7, the remainder will be 2^6 = 64.

But 64 > 7 ,so divide 64/ 7 , remainder is 1.

Both 3 and 6 work...

let me make necessary changes to the problem

thanks

praetorian