login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A051934
a(n) is the smallest palindrome > a(n-1) such that a(1)+a(2)+...+a(n) is a prime.
6
2, 3, 6, 8, 22, 66, 242, 252, 262, 414, 444, 626, 676, 686, 808, 2442, 2552, 2992, 4664, 4884, 6006, 6226, 6666, 8228, 20202, 20302, 20402, 40204, 40304, 60606, 61116, 61716, 80608, 202202, 207702, 212212, 402204, 405504, 609906, 619916, 623326, 801108
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