OFFSET
1,1
COMMENTS
a(n) is even except for n = 2. - Chai Wah Wu, Aug 30 2021
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..186 (terms 1..100 from Reinhard Zumkeller)
MATHEMATICA
palQ[n_] := Reverse[x = IntegerDigits[n]] == x; t = {s = 2}; Do[If[palQ[n] && PrimeQ[x = s + n], AppendTo[t, n]; s = x], {n, 3, 815000}]; t (* Jayanta Basu, Jun 24 2013 *)
sp[{t_, a_}]:=Module[{k=a+1}, While[!PalindromeQ[k]||!PrimeQ[t+k], k++]; {t+k, k}]; NestList[ sp, {2, 2}, 50][[;; , 2]] (* Harvey P. Dale, Jul 08 2024 *)
PROG
(Haskell)
a051934 n = a051934_list !! (n-1)
a051934_list = f 0 a002113_list where
f x (m:ms) | a010051 (x + m) == 1 = m : f (x + m) ms
| otherwise = f x ms
-- Reinhard Zumkeller, Dec 28 2011
CROSSREFS
KEYWORD
easy,nice,nonn,base
AUTHOR
Felice Russo, Dec 21 1999
EXTENSIONS
Missing a(29)=40304 inserted by Reinhard Zumkeller, Dec 28 2011
STATUS
approved