OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
Cathal O'Sullivan, Jonathan P. Sorenson, and Aryn Stahl, An Algorithm to Find Sums of Consecutive Powers of Primes, arXiv:2204.10930 [math.NT], 2022-2023. See S3 p. 10.
PROG
(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)); }
(Python)
import heapq
from sympy import prime
from itertools import islice
def agen(): # generator of terms
p = prime(1)**3; h = [(p, 1, 1)]; nextcount = 2
while True:
(v, s, l) = heapq.heappop(h)
yield v
if v >= p:
p += prime(nextcount)**3
heapq.heappush(h, (p, 1, nextcount))
nextcount += 1
v -= prime(s)**3; s += 1; l += 1; v += prime(l)**3
heapq.heappush(h, (v, s, l))
print(list(islice(agen(), 47))) # Michael S. Branicky, Apr 26 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Apr 26 2022
STATUS
approved