|
Solution 20
by bugzpodder ii)
implies the second digit to the right is 0
iii) we can write the digit as 1000a+100b+d
reversed, we get 1000d+10b+a
so 999d-90b-999a=999, 111d-10b-111a=111
111(d-a)-10b=111
so d>a. but the maximum of 10b is 90, if d-a>=2,
111(d-a)-10b>=222-90>111, so d=a+1
hence d-a=1, b=0
we first observe that n=2,5 does not work
then the last digit d must be either 1,3,7,9
the corresponding a=0,2,6,8
but i) implies a<6000, hence our number is 0001 or 2003. 1 obviously
is not prime so 2003 is our answer
|