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.

A070689 Numbers k such that k+1 and k^2+1 are primes.

Original entry on oeis.org

1, 2, 4, 6, 10, 16, 36, 40, 66, 126, 130, 150, 156, 180, 210, 240, 250, 256, 270, 280, 306, 396, 400, 420, 430, 466, 490, 556, 570, 576, 646, 690, 700, 750, 760, 826, 906, 910, 936, 946, 966, 1060, 1096, 1150, 1276, 1290, 1306, 1320, 1366, 1566, 1570
Offset: 1

Views

Author

Robert G. Wilson v, May 13 2002

Keywords

Comments

For any n > 1 in this sequence, (n+1)*(n^2+1) has the same nonzero digits as its prime factors in base n. - Ely Golden, Dec 12 2016

Crossrefs

Cf. A067720.

Programs

  • Mathematica
    Select[ Range[2000], PrimeQ[ # + 1] && PrimeQ[ #^2 + 1] & ]
    Select[Prime[Range[250]],PrimeQ[(#-1)^2+1]&]-1 (* Harvey P. Dale, Feb 10 2022 *)
  • PARI
    list(lim)=my(v=List()); forprime(p=2,lim+1, if(isprime(1+(p-1)^2), listput(v,p-1))); Vec(v) \\ Charles R Greathouse IV, Dec 13 2016