%I #9 Jun 29 2026 11:04:38
%S 2,0,0,2,2,4,0,0,0,0,0,4,2,0,4,0,0,0,4,0,0,4,0,0,2,0,4,0,0,0,0,2,0,4,
%T 0,4,0,0,4,4,2,0,0,0,0,0,0,0,0,4,0,0,0,4,4,0,4,0,0,0,6,0,0,4,0,0,0,0,
%U 4,0,0,0,0,0,4,4,0,0,0,0,4,4,0,0,2,0,0,2,0,4,0,0,0,0,0,4,4,0,4,0
%N a(n) is the number of integer solutions of x^2 + 7*y^2 = 2*n + 1.
%H J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, Exercise n. 5 at p. 346.
%F a(n) = 2*Sum_{d | 2*n+1} JacobiSymbol(-7,d) (see Uspensky and Heaslet).
%e a(0) = 2 since 2*0 + 1 = 1 equals 1^2 + 7*0^2 and (-1)^2 + 7*0^2;
%e a(3) = 2 since 2*3 + 1 = 7 equals 0^2 + 7*1^2 and 0^2 + 7*(-1)^2;
%e a(5) = 4 since 2*5 + 1 = 11 equals 2^2 + 7*1^2, (-2)^2 + 7*1^2, 2^2 + 7*(-1)^2, and (-2)^2 + 7*(-1)^2.
%t a[n_]:=2*Sum[JacobiSymbol[-7,d],{d,Divisors[2n+1]}]; Array[a,100,0]
%Y Cf. A005881, A274658.
%K nonn
%O 0,1
%A _Stefano Spezia_, Jun 29 2026