OFFSET
1,2
COMMENTS
If n is a multiple of 10, after reversal leading zeros are discarded before adding 1.
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..5500
EXAMPLE
a(3)= 5: 5^2= 25: reversing the digits gives 52: 52+1= 53 which is prime.
a(7)= 15: 15^2= 225: reversing the digits gives 522: 522+1= 523 which is prime.
MAPLE
with(StringTools):KD:= proc() local a; a:= parse(Reverse(convert((n^2), string)))+1; if isprime(a) then RETURN (n): fi; end: seq(KD(), n=1..1000);
MATHEMATICA
Select[Range[500], PrimeQ[ToExpression[StringReverse[ToString[#^2]]] + 1] &]
Select[Range[500], PrimeQ[IntegerReverse[#^2]+1]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 04 2018 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Nov 21 2013
STATUS
approved