login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000925 Number of ordered ways of writing n as a sum of 2 squares of nonnegative integers. 15

%I

%S 1,2,1,0,2,2,0,0,1,2,2,0,0,2,0,0,2,2,1,0,2,0,0,0,0,4,2,0,0,2,0,0,1,0,

%T 2,0,2,2,0,0,2,2,0,0,0,2,0,0,0,2,3,0,2,2,0,0,0,0,2,0,0,2,0,0,2,4,0,0,

%U 2,0,0,0,1,2,2,0,0,0,0,0,2,2,2,0,0,4,0,0,0,2,2,0,0,0,0,0,0,2,1,0,4

%N Number of ordered ways of writing n as a sum of 2 squares of nonnegative integers.

%D A. Das and A. C. Melissinos, Quantum Mechanics: A Modern Introduction, Gordon and Breach, 1986, p. 47.

%D E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985.

%H T. D. Noe, <a href="/A000925/b000925.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>

%F Coefficient of q^k in (1/4)*(1 + theta_3(0, q))^2.

%F a(A001481(n))>0; a(A022544(n))=0. - _Benoit Cloitre_, Apr 20 2003

%t a[n_] := (pr = PowersRepresentations[n, 2, 2]; Count[Union[Join[pr, Reverse /@ pr]], {j_ /; j >= 0, k_ /; k >= 0}]); a /@ Range[0, 100] (* _Jean-Fran├žois Alcover_, Apr 05 2011 *)

%t nn = 100; t = CoefficientList[Series[Sum[x^k^2, {k, 0, Sqrt[nn]}]^2, {x, 0, nn}], x] (* _T. D. Noe_, Apr 05 2011 *)

%t SquareQ[n_] := IntegerQ[Sqrt[n]]; Table[Count[FrobeniusSolve[{1, 1}, n], {__?SquareQ}], {n, 0, 100}] (* _Robert G. Wilson v_, Apr 15 2017 *)

%o (PARI) a(n)=sum(i=0,n,sum(j=0,n,if(i^2+j^2-n,0,1)))

%o (Haskell)

%o a000925 n = sum $ map (a010052 . (n -)) $ takeWhile (<= n) a000290_list

%o -- _Reinhard Zumkeller_, Sep 14 2014

%Y Cf. A000290, A010052, A000161, A247367.

%K nonn,nice

%O 0,2

%A Jacques Haubrich (jhaubrich(AT)freeler.nl)

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 27 21:52 EDT 2020. Contains 334671 sequences. (Running on oeis4.)