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.

A161533 The smallest of three consecutive primes p1 < p2 < p3, where p2-p1, p3-p2, and p3-p1 are all perfect squares.

Original entry on oeis.org

623071, 779377, 1744891, 2055853, 2906887, 3168721, 3540793, 4177573, 4245643, 4245679, 4309957, 4449127, 4833271, 4858981, 5541187, 5550583, 5710531, 5710567, 5856931, 6013591, 6789637, 6855493, 7024627, 7162339, 7340383, 7614847, 8143501
Offset: 1

Views

Author

Ki Punches, Jun 13 2009

Keywords

Comments

Note that sqrt(p2-p1), sqrt(p3-p2), sqrt(p3-p1) form a Pythagorean triple. [corrected by James R. Buddenhagen, Jul 09 2013]
Gap pairs p1-p2, p3-p2 occur as 36,64, or 64,36 at least through a(n) <= 10^8.

Examples

			623071 is the smallest of the consecutive primes 623071, 623107, and 623171 with gaps 623107-623071 = 36, 623171-623107 = 64, and the double gap 623171-623071 = 100 each a perfect square.
		

Crossrefs

Programs

  • Mathematica
    PerfectSquareQ[n_] := JacobiSymbol[n, 13] =!= -1 && JacobiSymbol[n, 19] =!= -1 && JacobiSymbol[n, 17] =!= -1 && JacobiSymbol[n, 23] =!= -1 && IntegerQ[Sqrt[n]]; t = {}; n = 2; p1 = 1; p2 = 2; p3 = 3; While[Length[t] < 30, n++; p1 = p2; p2 = p3; p3 = Prime[n]; If[PerfectSquareQ[p2 - p1] && PerfectSquareQ[p3 - p2] && PerfectSquareQ[p3 - p1], AppendTo[t, p1]]]; t (* T. D. Noe, Jul 09 2013 *)
    psQ[{a_,b_,c_}]:=AllTrue[{Sqrt[b-a],Sqrt[c-b],Sqrt[c-a]},IntegerQ]; Transpose[ Select[Partition[ Prime[Range[600000]],3,1],psQ]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 20 2014 *)

Extensions

5710567 inserted by R. J. Mathar, Sep 23 2009