login
A230199
Sum of digits of n-th palindromic prime.
6
2, 3, 5, 7, 2, 2, 5, 7, 10, 11, 7, 11, 13, 14, 16, 19, 22, 23, 19, 20, 5, 7, 8, 7, 8, 10, 13, 14, 11, 16, 17, 13, 17, 16, 17, 14, 17, 19, 20, 20, 25, 19, 22, 23, 28, 29, 7, 8, 10, 13, 14, 8, 13, 13, 14, 17, 19, 22, 16, 17, 19, 23, 20, 23, 22, 25, 22, 23, 29
OFFSET
1,1
LINKS
FORMULA
a(n) = A007953(A002385(n)). - R. J. Mathar, Sep 09 2015
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