OFFSET
1,1
COMMENTS
p = n^3 - 2, p and p+4 are "near(est) cube" primes as n^3 -/+ 1 = (n -/+ 1) * (n^2 +/- n + 1).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A178228(n)^3 - 2. - Amiram Eldar, Dec 24 2019
EXAMPLE
p = 2146687 is a term, as p + 2 = 129^3 and both p = 129^3 - 2 and p + 4 = 129^3 + 2 are prime.
MATHEMATICA
Select[Range[2300]^3 - 2, And @@ PrimeQ[# + {0, 4}] &] (* Amiram Eldar, Dec 24 2019 *)
PROG
(PARI) isok(p) = isprime(p) && (q=nextprime(p+1)) && (q-p==4) && ispower(p+2, 3); \\ Michel Marcus, Nov 27 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 23 2010
EXTENSIONS
Corrected by D. S. McNeil, Nov 24 2010
More terms from Amiram Eldar, Dec 24 2019
STATUS
approved