OFFSET
1,1
LINKS
Shyam Sunder Gupta, Table of n, a(n) for n = 1..5953
FORMULA
EXAMPLE
a(6) =2, since sum of digits of 6th palindromic prime i.e. 101 is 2.
MATHEMATICA
a = {}; Do[z = n*10^(IntegerLength[n] - 1) +
FromDigits@Rest@Reverse@IntegerDigits[n]; If[PrimeQ[z], s = Apply[Plus, IntegerDigits[z]]; AppendTo[a, s]], {n, 1, 10^5}]; Insert[a, 2, 5]
palQ[n_]:=Module[{idn=IntegerDigits[n]}, idn==Reverse[idn]]; Total[ IntegerDigits[ #]]&/@ Select[Prime[Range[5000]], palQ] (* Harvey P. Dale, Oct 10 2014 *)
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Shyam Sunder Gupta, Oct 11 2013
STATUS
approved