OFFSET
1,1
COMMENTS
Terms that are not divisible by 4 are 29, 49, 57, 73, 105, 153, 161, 189, 201, 281, 289, 329, 345, 373, 385, 409, 417, 449, 457, 529, 553, 617, 633, 641, 645, ...
Corresponding values of sum of squares of the first n primes are 87, 4727, 30007, 98055, 109936, 239087, 486655, 710844, 874695, 1203356, 1432487, 2210983, 2841372, 3270831, ...
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
4 is a term because 2^2 + 3^2 + 5^2 + 7^2 = 87 and 87 = x^2 + y^2 + z^2 has no solution for integer x, y and z.
5 is not a term because 2^2 + 3^2 + 5^2 + 7^2 + 11^2 = 208 = 8^2 + 12^2.
MATHEMATICA
Select[Range@ 372, Nand[SquaresR[4, #] > 1, Or[SquaresR[3, #] > 1, SquaresR[2, #] > 1, IntegerQ@ Sqrt@ #]] &@ Total[Prime[Range@ #]^2] &] (* Michael De Vlieger, Mar 08 2016 *)
PROG
(PARI) isA004215(n)= my(fouri, j) ; fouri=1 ; while( n >=7*fouri, if( n % fouri ==0, j= n/fouri-7 ; if( j % 8==0, return(1) ) ; ); fouri *= 4 ; ) ; return(0) ;
a024450(n) = sum(k=1, n, prime(k)^2);
for(n=1, 1e3, if(isA004215(a024450(n)), print1(n, ", ")));
(PARI) list(lim)=my(v=List(), n, s); forprime(p=2, , s+=p^2; if(n++>lim, return(Vec(v))); if(s\4^valuation(s, 4)%8==7, listput(v, n))) \\ Charles R Greathouse IV, Mar 08 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 08 2016
STATUS
approved