OFFSET
1,1
COMMENTS
All terms of this sequence are the sum of 4 but no fewer nonzero squares.
EXAMPLE
The prime 563047 is a term because 563048 = 218^2 + 718^2, 563049 = 165^2 + 732^2 = 357^2 + 660^2 and 563050 = 71^2 + 747^2 = 141^2 + 737^2 = 505^2 + 555^2.
PROG
(PARI) is(n, k) = {nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb == k; }
isok(n) = isprime(n) && is(n+1, 1) && is(n+2, 2) && is(n+3, 3);
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, May 26 2016
STATUS
approved