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.

A084952 Middle q of three consecutive primes p,q,r such that (p^2 + q^2 + r^2)/3 is prime.

Original entry on oeis.org

11, 13, 23, 43, 53, 103, 211, 223, 233, 263, 271, 281, 293, 317, 331, 349, 397, 431, 463, 479, 499, 557, 577, 643, 761, 773, 787, 797, 829, 929, 1187, 1327, 1373, 1399, 1427, 1429, 1451, 1453, 1483, 1583, 1627, 1667, 1693, 1747, 1753, 1783, 2027, 2099, 2129
Offset: 1

Views

Author

Hugo Pfoertner, Jun 14 2003

Keywords

Examples

			a(3)=23 because (19^2 + 23^2 + 29^2)/3 = 1731/3 = 577 is prime.
		

Crossrefs

Programs

  • Maple
    q:= 5: r:= 7:
    Res:= NULL: count:= 0:
    while count < 100 do
      p:= q;
      q:= r;
      r:= nextprime(r);
      if isprime((p^2+q^2+r^2)/3) then count:= count+1; Res:= Res,q fi
    od:
    Res; # Robert Israel, Aug 20 2018
  • Mathematica
    Select[Partition[Prime[Range[400]],3,1],PrimeQ[Total[#^2]/3]&][[;;,2]] (* Harvey P. Dale, Sep 08 2023 *)