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.

A246760 a(1) = 5; a(n) for n > 1 is the smallest prime > a(n-1) that differs from a(n-1) by a square.

Original entry on oeis.org

5, 41, 617, 653, 797, 941, 977, 1013, 1049, 1193, 1229, 1373, 1409, 1553, 1697, 1733, 1877, 1913, 1949, 2273, 2309, 2633, 2777, 3677, 3821, 4397, 4721, 5297, 5333, 5477, 5801, 6701, 6737, 8501, 8537, 8573, 8609, 8753, 11057, 11093, 13397, 13721, 13757, 13901, 18257, 18401, 19301, 20201, 21101, 22397, 22433, 22469, 22613, 22937, 22973, 23117, 24413, 24989
Offset: 1

Views

Author

Zak Seidov, Sep 02 2014

Keywords

Comments

All terms are congruent to 5 mod 36.
For sequences of this type, once you get a(n) == 5, 11, 17, 23, 29, or 35 mod 36, all later terms stay in the same congruence class mod 36. Sequences in the same congruence class are likely to merge after a few terms. Thus with a(1) = 77 you get 77, 113, 149, 293, 617 and from then on it's the same as the present sequence. - Robert Israel, Sep 05 2014

Examples

			41 - 5 = 6^2, 617 - 41 = 24^2, 653 - 617 = 6^2.
		

Crossrefs

Programs

  • Mathematica
    sps[n_]:=Module[{p=NextPrime[n]},While[!IntegerQ[Sqrt[p-n]],p= NextPrime[ p]];p]; NestList[sps,5,60] (* Harvey P. Dale, Jul 28 2016 *)
  • PARI
    print1(p=5",");for(k=1,100,x=1;while(!isprime(q=p+36*x^2),x=x+1);print1(q",");p=q)