OFFSET
1,2
COMMENTS
If the equation x^2 + y^2 = n has two solutions (x, y), (y, x) then they will be counted differently.
No solutions can exist for the values of k > n.
a(n) is the same as A216673(n) when n is not the sum of two positive squares.
But when n is the sum of two positive squares, the ordered pairs for the equation x^2 + y^2 = n count.
For example,
10 = 3^2 + 1^2.
10 = 1^2 + 3^2.
10 = 2^2 + 6*1^2.
10 = 1^2 + 9*1^2.
10 = 0^2 + 10*1^2.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = 0 if n is a square, otherwise a(n) = Sum_{k = 0..sqrt(n)} A046951(n-k^2). - Charlie Neder, Jan 15 2019
PROG
(PARI) for(n=1, 100, sol=0; for(k=1, n, for(x=0, n, if((issquare(n-k*x*x)&&n-k*x*x>=0), sol++))); if(issquare(n), print1(0", "), print1(sol", "))) /* V. Raman, Oct 16 2012 */
CROSSREFS
KEYWORD
nonn
AUTHOR
V. Raman, Oct 16 2012
STATUS
approved