%I #14 Apr 18 2024 06:11:05
%S 8,27,35,125,152,160,343,468,495,503,1331,1674,1799,1826,1834,2197,
%T 3528,3871,3996,4023,4031,4913,6859,7110,8441,8784,8909,8936,8944,
%U 11772,12167,13969,15300,15643,15768,15795,15803,19026,23939,24389,26136,27467,27810,27935,27962,27970,29791
%N Numbers that are the sum of some number of consecutive prime cubes.
%H Michael S. Branicky, <a href="/A352423/b352423.txt">Table of n, a(n) for n = 1..10000</a>
%H Cathal O'Sullivan, Jonathan P. Sorenson, and Aryn Stahl, <a href="https://arxiv.org/abs/2204.10930">An Algorithm to Find Sums of Consecutive Powers of Primes</a>, arXiv:2204.10930 [math.NT], 2022-2023. See S3 p. 10.
%o (PARI) lista(nn) = {my(list = List(), ip = primepi(nn), vp = primes(ip)); for(i=1, ip, my(s=vp[i]^3); listput(list, s); for (j=i+1, ip, s += vp[j]^3; if (s >vp[ip]^3, break); listput(list, s); ); ); Vec(vecsort(list, , 8)); }
%o (Python)
%o import heapq
%o from sympy import prime
%o from itertools import islice
%o def agen(): # generator of terms
%o p = prime(1)**3; h = [(p, 1, 1)]; nextcount = 2
%o while True:
%o (v, s, l) = heapq.heappop(h)
%o yield v
%o if v >= p:
%o p += prime(nextcount)**3
%o heapq.heappush(h, (p, 1, nextcount))
%o nextcount += 1
%o v -= prime(s)**3; s += 1; l += 1; v += prime(l)**3
%o heapq.heappush(h, (v, s, l))
%o print(list(islice(agen(), 47))) # _Michael S. Branicky_, Apr 26 2022
%Y Cf. A030078, A034707, A340771.
%K nonn
%O 1,1
%A _Michel Marcus_, Apr 26 2022