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.

A027863 Numbers k such that k^2 + (k+1)^2 + (k+2)^2 is prime.

Original entry on oeis.org

0, 2, 6, 12, 14, 24, 34, 52, 56, 62, 66, 76, 86, 94, 96, 122, 124, 132, 152, 154, 164, 182, 184, 194, 206, 216, 226, 244, 252, 254, 262, 272, 276, 294, 322, 336, 342, 362, 364, 376, 384, 404, 406, 416, 436, 446, 464, 472, 486, 502, 546, 556, 584, 604, 612, 616
Offset: 1

Views

Author

Keywords

Comments

No positive terms == {0,8} (mod 10). Numbers k such that both k and k+2 are terms: 12, 94, 122, 152, 182, 252, 362, 204, ... Numbers k such that k, k+2 and k+4 are terms: 1942, 7222, 7402, 15692, 23502, 30182, ... - Zak Seidov, Aug 22 2014

Crossrefs

Cf. A027864 (associated primes).

Programs

  • Magma
    [n: n in [0..1000] |IsPrime(n^2+(n+1)^2+(n+2)^2)]; // Vincenzo Librandi, Nov 18 2010
    
  • Maple
    select(t -> isprime(t^2+(t+1)^2+(t+2)^2), [$0..1000]); # Robert Israel, Aug 22 2014
  • Mathematica
    Select[Range[0,700],PrimeQ[Total[(#+{0,1,2})^2]]&] (* Harvey P. Dale, Apr 28 2012 *)
  • PARI
    for(n=1,10^3,s=sum(i=0,2,(n+i)^2);if(isprime(s),print1(n,", "))) \\ Derek Orr, Aug 22 2014