%I #13 Sep 08 2022 08:46:06
%S 1,0,0,1,0,0,0,0,2,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,2,0,0,0,0,0,0,0,2,0,
%T 0,2,0,0,0,0,1,0,0,0,0,0,0,1,2,0,0,1,0,0,0,0,2,0,0,0,0,0,0,1,2,0,0,1,
%U 0,0,0,0,1,0,0,0,0,0,0,1,3,0,0,2,0,0
%N Number of nonnegative integer solutions to the equation x^2 - 16*y^2 = n.
%C For (x, y) to be a solution to the more general equation x^2 - d^2*y^2 = n, it can be shown that n-f^2 must be divisible by 2*f*d, where f is a divisor of n not exceeding sqrt(n). Then y = (n-f^2)/(2*f*d) and x = d*y+f.
%H Bruno Berselli, <a href="/A230279/b230279.txt">Table of n, a(n) for n = 1..1000</a>
%e a(33)=2 because x^2 - 16*y^2 = 33 has two solutions: (x,y) = (17,4) and (7,1).
%o (PARI) a(n) = sumdiv(n, f, f^2<=n && (n-f^2)%(8*f)==0);
%o (Magma) d:=4; solutions:=func<i | [f: f in Divisors(i) | f le Isqrt(i) and IsZero((i-f^2) mod (2*f*d))]>; [#solutions(n): n in [1..100]]; // _Bruno Berselli_, Oct 15 2013
%Y Cf. A034178, A230263, A230264.
%K nonn
%O 1,9
%A _Colin Barker_, Oct 15 2013