OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
FORMULA
Solutions to A077038(x) = 4.
EXAMPLE
n=129:{p=2146687,n^3=2146689,q=2146691}, q-p=4.
MATHEMATICA
pre[x_] := Prime[PrimePi[x]] nex[x_] := Prime[PrimePi[x]+1] de[x_] := Prime[PrimePi[x]+1]-Prime[PrimePi[x]] k=3; Do[If[Equal[Prime[PrimePi[n^k]+1]-Prime[PrimePi[n^k]], 4], Print[n]], {n, 2, 100000}]
lst={}; Do[m=n^3; If[PrimeQ[m-2]&&PrimeQ[m+2], AppendTo[lst, n]], {n, 0, 10^5}]; lst (* Vladimir Joseph Stephan Orlovsky, Sep 04 2008 *)
Select[Range[2, 6100], NextPrime[#^3]-NextPrime[#^3, -1]==4&] (* Harvey P. Dale, Sep 17 2017 *)
PROG
(PARI) is(n)=if(n%2, isprime(n^3-2) && isprime(n^3+2), n==2) \\ Charles R Greathouse IV, Feb 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jan 12 2004
EXTENSIONS
More terms from Harvey P. Dale, Sep 17 2017
STATUS
approved