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.

Showing 1-3 of 3 results.

A084951 Primes in A075893: Primes of the form (p^2+q^2+r^2)/3, where p,q,r are 3 consecutive primes.

Original entry on oeis.org

113, 193, 577, 1913, 2833, 10753, 44617, 48593, 54617, 69193, 74177, 78593, 86729, 102673, 107873, 122273, 156577, 183497, 214993, 228233, 247697, 308809, 334513, 414313, 581177, 602753, 617369, 636353, 691697, 861857, 1408993, 1786097
Offset: 1

Views

Author

Hugo Pfoertner, Jun 14 2003

Keywords

Comments

With the exception of 2^2+3^2+5^2=38 and 3^2+5^2+7^2=83 all sums of squares of 3 consecutive primes are divisible by 3 because mod(p^2,3)=1 for all primes p>3.

Examples

			a(1)=113 because (7^2+11^2+13^2)/3=(49+121+169)/3=339/3=113 is prime.
		

Crossrefs

Programs

  • Mathematica
    b = {}; a = 2; Do[k = (Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a)/3; If[PrimeQ[k], AppendTo[b, n]], {n, 1, 200}]; b (* Artur Jasinski, Sep 30 2007 *)
  • PARI
    v=vector(10000);i=0;p=5;q=7; forprime(r=8,1e8,if(isprime(t=(p^2+q^2+r^2)/3), v[i++]=t; if(i==#v,return)); p=q; q=r) \\ Charles R Greathouse IV, Feb 14 2011

Extensions

Edited by N. J. A. Sloane, Jun 30 2008 at the suggestion of R. J. Mathar.

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

A164130 Sums s of squares of three consecutive primes, such that s-+2 are primes.

Original entry on oeis.org

195, 5739, 18459, 32259, 33939, 60291, 74019, 169491, 187131, 244899, 276819, 388179, 783531, 902139, 3588339, 5041491, 5145819, 5193051, 8687091, 9637491, 10227291, 10910019, 11341491, 11757339, 14834379, 15354651, 16115091
Offset: 1

Views

Author

Keywords

Examples

			5^2 + 7^2 + 11^2 = 195 is a sum of the squared consecutive primes 5, 7 and 11, and 193 and 197 are primes, so 195 is a member of the sequence.
		

Crossrefs

Programs

  • Maple
    q:= 2: r:= 3: R:= NULL: count:= 0:
    while count < 100 do
      p:= q; q:= r; r:= nextprime(r);
      s:= p^2+q^2+r^2;
      if isprime(s-2) and isprime(s+2) then
        count:= count+1; R:= R,s;
      fi;
    od:
    R; # Robert Israel, Apr 21 2023
  • Mathematica
    lst={};Do[p=Prime[n]^2+Prime[n+1]^2+Prime[n+2]^2;If[PrimeQ[p-2]&&PrimeQ[p+2], AppendTo[lst,p]],{n,8!}];lst

Formula

A133529 INTERSECT A087679. - R. J. Mathar, Aug 27 2009

Extensions

Comment turned into example by R. J. Mathar, Aug 27 2009
Showing 1-3 of 3 results.