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.
%I A226524 #27 May 25 2022 01:59:50 %S A226524 8,216,21952,74088,373248,4251528,5268024,10648000,10941048,12812904, %T A226524 14886936,16003008,25934336,40707584,54872000,59319000,114791256, %U A226524 132651000,199176704,209584584,259694072,269586136,306182024,345948408,373248000,543338496,567663552 %N A226524 Cubes which are the sum of two consecutive primes. %H A226524 Michael S. Branicky, <a href="/A226524/b226524.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Donovan Johnson) %F A226524 a(n) = A074925(n)^3 = A000040(i) + A000040(i+1) with i = A071220(n) = A000720(A061308(n)). - _M. F. Hasler_, Jan 03 2020 %e A226524 a(2) = 216: prime(28) + prime(29) = 107 + 109 = 216 = 6^3. %p A226524 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); %t A226524 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 *) %o A226524 (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 */ %o A226524 (PARI) A226524(n)=A074925(n)^3 \\ _M. F. Hasler_, Jan 03 2020 %o A226524 (Python) %o A226524 from itertools import count, islice %o A226524 from sympy import nextprime, prevprime %o A226524 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) %o A226524 print(list(islice(agen(), 27))) # _Michael S. Branicky_, May 24 2022 %Y A226524 Cubes in A001043. %Y A226524 Cf. A062703 (analog for squares), A061308 (lesser of the consecutive primes), A071220 (index of that prime), A074925 (a(n)^(1/3)). %K A226524 nonn,easy %O A226524 1,1 %A A226524 _K. D. Bajpai_, Aug 31 2013 %E A226524 Edited by _M. F. Hasler_, Jan 03 2020