cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A051934 a(n) is the smallest palindrome > a(n-1) such that a(1)+a(2)+...+a(n) is a prime.

Original entry on oeis.org

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

Views

Author

Felice Russo, Dec 21 1999

Keywords

Comments

a(n) is even except for n = 2. - Chai Wah Wu, Aug 30 2021

Crossrefs

Programs

  • 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
  • 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 *)

Extensions

Missing a(29)=40304 inserted by Reinhard Zumkeller, Dec 28 2011