OFFSET
1,1
LINKS
Robert Israel, 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 S2 p. 10.
Janyarak Tongsomporn, Saeree Wananiyakul, and Jörn Steuding, Sums of Consecutive Prime Squares, arXiv:2101.07558 [math.NT], 2021.
Janyarak Tongsomporn, Saeree Wananiyakul, and Jörn Steuding, Sums of Consecutive Prime Squares, #A9 INTEGERS 22 (2022).
EXAMPLE
The initial terms are 2^2, 3^2, 2^2+3^2, 5^2, 3^2+5^2, ...
MAPLE
N:= 10000: # for terms <= N
PS:= [0, seq(ithprime(i)^2, i=1..numtheory:-pi(floor(sqrt(N))))]:
SPS:= ListTools:-PartialSums(PS):
sort(convert(select(`<=`, {seq(seq(SPS[t]-SPS[s], s=1..t-1), t=2..nops(SPS))}, N), list)); # Robert Israel, Jan 20 2021
PROG
(PARI) lista(nn) = {my(list = List(), ip = primepi(nn), vp = primes(ip)); for(i=1, ip, my(s=vp[i]^2); listput(list, s); for (j=i+1, ip, s += vp[j]^2; if (s >vp[ip]^2, break); listput(list, s); ); ); Vec(vecsort(list, , 8)); } \\ Michel Marcus, Jan 20 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Jan 20 2021
STATUS
approved