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.

A261832 Numbers n such that prime(n)^3 + n is prime.

Original entry on oeis.org

2, 4, 6, 24, 32, 34, 36, 84, 86, 88, 112, 172, 182, 200, 212, 240, 258, 290, 306, 320, 336, 360, 366, 396, 404, 406, 434, 480, 494, 504, 528, 536, 556, 558, 580, 612, 636, 718, 722, 732, 794, 906, 960, 966, 992, 994, 1008, 1020, 1116, 1132, 1176, 1184, 1186, 1212
Offset: 1

Views

Author

K. D. Bajpai, Sep 02 2015

Keywords

Examples

			6 is in the list because prime(6)^3 + 6 = 13^3 + 6 = 2197 + 6 = 2203, which is prime.
24 is in the list because prime (24)^3 + 24 = 89^3 + 24 = 704969 + 24 = 704993, which is prime.
		

Crossrefs

Programs

  • Magma
    [n : n in [1..2000] | IsPrime(NthPrime(n)^3 +n)];
  • Maple
    select(n -> isprime(ithprime(n)^3 + n), [seq(n,n=1..2000)]);
  • Mathematica
    Select[Range[2000], PrimeQ[Prime[#]^3 + #] &]
  • PARI
    for(n = 1,2000, if(isprime(prime(n)^3 + n), print1(n,", ")));