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-2 of 2 results.

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

A261748 Primes of the form p^3 - q^3 + r^3 where p, q, r are consecutive primes.

Original entry on oeis.org

19081, 17569, 124561, 284129, 461933, 12994939, 59888791, 136812059, 210687859, 381287213, 430477739, 967646789, 1003292441, 1214844443, 1235842577, 1630956673, 2035265203, 3409511489, 3760252651, 4212399799, 5010219631, 5823581399, 6487158329, 7774729381, 8729833339
Offset: 1

Views

Author

K. D. Bajpai, Aug 30 2015

Keywords

Comments

Indices of the initial primes p: 8, 9, 14, 18, 20, 51, 76, 96, 108, 128, 133, 166, 168, ..., . - Robert G. Wilson v, Sep 03 2015

Examples

			19081 appears in the sequence because 19^3 - 23^3 + 29^3 = 19081 which is prime and 19, 23, 29 are consecutive primes.
17569 appears in the sequence because 23^3 - 29^3 + 31^3 = 17569 which is prime and 23, 29, 31 are consecutive primes.
		

Crossrefs

Programs

  • Magma
    [k: n in [1..1000] | IsPrime(k) where k is (NthPrime(n)^3 - NthPrime(n+1)^3 + NthPrime(n+2)^3)];
  • Mathematica
    Select[Table[(Prime[n]^3 - Prime[n + 1]^3 + Prime[n + 2]^3), {n, 1, 1000}], PrimeQ]
    Select[#[[1]]-#[[2]]+#[[3]]&/@Partition[Prime[Range[500]]^3,3,1],PrimeQ] (* Harvey P. Dale, Jul 29 2021 *)
  • PARI
    for(n=1, 500, k=(prime(n)^3 - prime(n+1)^3 + prime(n+2)^3 ); if(isprime(k), print1(k, ", ")));
    
Showing 1-2 of 2 results.