login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216278 Number of solutions to the equation x^2+2y^2 = n with x and y > 0. 2

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 18 08:17 EDT 2024. Contains 375997 sequences. (Running on oeis4.)