%I #10 Jun 24 2017 12:13:11
%S 0,0,1,0,0,1,0,0,1,0,1,1,0,0,0,0,1,1,1,0,0,1,0,1,0,0,2,0,0,0,0,0,2,1,
%T 0,1,0,1,0,0,1,0,1,1,0,0,0,1,0,0,2,0,0,2,0,0,2,0,1,0,0,0,0,0,0,2,1,1,
%U 0,0,0,1,1,0,1,1,0,0,0,0,2,1,1,0,0,1,0,1,1,0,0,0,0,0,0,1,1,0,3,0,0,2,0,0,0,0,1,2,0,0,0,0,1,2,0,0,0,1,0,0
%N Number of solutions to the equation x^2+2y^2 = n with x and y > 0.
%t r[n_] := Reduce[x > 0 && y > 0 && x^2 + 2 y^2 == n, Integers];
%t a[n_] := Which[rn = r[n]; rn === False, 0, Head[rn] === And, 1, Head[rn] === Or, Length[rn], True, -1];
%t Table[a[n], {n, 1, 120}] (* _Jean-François Alcover_, Jun 24 2017 *)
%Y Cf. A092573, A119395, A000161, A025426.
%K nonn
%O 1,27
%A _V. Raman_, Sep 03 2012
|