OFFSET
1,1
COMMENTS
Conjecture: The only twin prime pair in the sequence is (5, 7).
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
The prime number 17 is the fifth term because the sum of squares of the first 5 prime numbers is 2^2 + 3^2 + 5^2 + 7^2 + 11^2 = 208 < 17^2 = 289.
MATHEMATICA
Table[Function[k, p = 2; While[p^2 < k, p = NextPrime@ p]; p][Total[Prime[Range@ n]^2]], {n, 52}] (* Michael De Vlieger, Jul 18 2017 *)
spn[n_]:=Module[{k=Ceiling[Sqrt[n]]}, If[PrimeQ[k], k, NextPrime[k]]]; spn/@ Accumulate[Prime[Range[60]]^2] (* Harvey P. Dale, May 20 2021 *)
PROG
(PARI) {
sp=0; p=0;
forprime(n=2, 200,
sp+=n^2;
while(p^2<sp, p=nextprime(p+1));
print1(p", ")
)
}
(PARI) a(n) = my(s=sum(k=1, n, prime(k)^2)); forprime(p=1, , if(p^2 >= s, return(p))) \\ Felix Fröhlich, Jul 18 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Dimitris Valianatos, Jul 17 2017
EXTENSIONS
Definition clarified by Felix Fröhlich, Jul 18 2017
STATUS
approved