login
Numbers n such that reversal(n!+n) is prime.
0

%I #2 Mar 31 2012 14:45:48

%S 1,5,37,857,2566

%N Numbers n such that reversal(n!+n) is prime.

%C It's obvious that 1 is the only number n such that n!+n is prime.

%C There is no further term up to 5000.

%e 37!+37=13763753091226345046315979581580902400000037 and reversal(37!+37)=

%e 73000000420908518597951364054362219035736731 is prime so 37 is in the sequence.

%t reversal[n_]:=FromDigits[Reverse[IntegerDigits[n]]];

%t Do[If[PrimeQ[reversal[n!+n]],Print[n]],{n,5000}]

%K base,hard,more,nonn

%O 1,2

%A _Farideh Firoozbakht_, Oct 22 2009