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.

A064713 Numbers k such that prime(k)^2 - k is prime.

Original entry on oeis.org

1, 2, 6, 8, 20, 30, 42, 48, 50, 60, 68, 96, 110, 122, 132, 168, 204, 222, 234, 284, 306, 332, 336, 366, 378, 392, 398, 402, 420, 440, 474, 488, 492, 506, 516, 518, 530, 572, 594, 600, 650, 672, 680, 740, 756, 762, 770, 810, 870, 884, 888, 902, 920, 930, 938
Offset: 1

Views

Author

Robert G. Wilson v, Oct 13 2001

Keywords

Examples

			6 is in the sequence because prime(6)^2 - 6 = 169 - 6 = 163 is a prime.
		

Crossrefs

Cf. A064361.

Programs

  • Maple
    A064713:=n->`if`(isprime(ithprime(n)^2-n), n, NULL): seq(A064713(n), n=1..2*10^3); # Wesley Ivan Hurt, Jan 21 2017
  • Mathematica
    Select[Range[1000],PrimeQ[Prime[#]^2-#]&] (* Harvey P. Dale, May 17 2013 *)
  • PARI
    { n=0; for (m=1, 10^9, if (isprime(prime(m)^2 - m), write("b064713.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 23 2009