|
|
A226524
|
|
Cubes which are the sum of two consecutive primes.
|
|
5
|
|
|
8, 216, 21952, 74088, 373248, 4251528, 5268024, 10648000, 10941048, 12812904, 14886936, 16003008, 25934336, 40707584, 54872000, 59319000, 114791256, 132651000, 199176704, 209584584, 259694072, 269586136, 306182024, 345948408, 373248000, 543338496, 567663552
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(2) = 216: prime(28) + prime(29) = 107 + 109 = 216 = 6^3.
|
|
MAPLE
|
KD: = proc() local a, b, c; a: = ithprime(n) + ithprime(n+1); b:= evalf(a^(1/3)); if b=floor(b) then RETURN(a): fi; end: seq(KD(), n=1..1000000);
|
|
MATHEMATICA
|
Select[Total/@Partition[Prime[Range[155*10^5]], 2, 1], IntegerQ[Surd[#, 3]]&] (* or *) stcpQ[n_]:=Module[{p1=NextPrime[Floor[n/2], -1], p2=NextPrime[Ceiling[n/2]]}, n==p1+p2]; Select[Range[850]^3, stcpQ] (* The second program is much more efficient than the first. *) (* Harvey P. Dale, May 15 2022 *)
|
|
PROG
|
(PARI) n=0; forstep(j=2, 55778, 2, c=j^3; c2=c/2; if(precprime(c2)+nextprime(c2)==c, n++; write("b226524.txt", n " " c))) /* Donovan Johnson, Sep 02 2013 */
(Python)
from itertools import count, islice
from sympy import nextprime, prevprime
def agen(): yield from (c for c in (k**3 for k in count(2, step=2)) if prevprime(c//2+1) + nextprime(c//2-1) == c)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|