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.

A275030 a(1) = 2. a(n) is the smallest prime such that a(n) - a(n-1) is a triangular number.

Original entry on oeis.org

2, 3, 13, 19, 29, 107, 113, 149, 227, 233, 239, 317, 353, 359, 479, 557, 563, 569, 647, 653, 659, 1187, 1193, 1229, 1307, 1373, 1409, 1487, 1493, 1499, 1619, 1697, 1733, 1811, 1847, 1913, 1949, 2027, 2063, 2069, 2447, 2657, 2663, 2699, 2777, 2843, 2879, 2957, 2963
Offset: 1

Views

Author

Ivan N. Ianakiev, Nov 13 2016

Keywords

Crossrefs

Cf. A278139.

Programs

  • Mathematica
    triQ[n_]:=IntegerQ[Sqrt[8n+1]];
    NestList[(x=NextPrime[#]; While[!triQ[x-#],x=NextPrime[x]];x)&,2,100]
  • PARI
    lista(nn) = {print1(p = 2, ", "); for (n=2, nn, q = nextprime(p+1); while (! ispolygonal(q-p, 3), q = nextprime(q+1)); print1(q, ", "); p = q;);} \\ Michel Marcus, Nov 13 2016