|
|
A163850
|
|
Primes p such that their distance to the nearest cube above p and also their distance to the nearest cube below p are prime.
|
|
0
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
nearest cubes above and below each prime p. If p is in A146318, the
distance to the larger cube, A048763(p)-p, is prime. If p is
in the set {3, 11, 13, 19, 29, 67,...,107, 127, 223,..}, the distance to the lower
cube is prime. If both of these distances are prime, we insert p into the sequence.
|
|
LINKS
|
|
|
EXAMPLE
|
p=3 is in the sequence because the distance p-1=2 to the cube 1^3 below 3, and also the distance 8-p=5 to the cube 8=2^3 above p are prime.
p=127 is in the sequence because the distance p-125=2 to the cube 125=5^3 below p, and also the distance 216-p=89 to the cube 216=6^3 above p, are prime.
|
|
MATHEMATICA
|
Clear[f, lst, p, n]; f[n_]:=IntegerPart[n^(1/3)]; lst={}; Do[p=Prime[n]; If[PrimeQ[p-f[p]^3]&&PrimeQ[(f[p]+1)^3-p], AppendTo[lst, p]], {n, 9!}]; lst
dncQ[n_]:=Module[{c=Floor[Surd[n, 3]]}, AllTrue[{n-c^3, (c+1)^3-n}, PrimeQ]]; Select[Prime[Range[230000]], dncQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 16 2016 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Edited, first 5 entries checked by R. J. Mathar, Aug 12 2009
|
|
STATUS
|
approved
|
|
|
|