cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A002635 Number of partitions of n into 4 squares.

This page as a plain text file.
%I A002635 M0053 N0018 #37 Jan 29 2022 01:03:15
%S A002635 1,1,1,1,2,1,1,1,1,2,2,1,2,2,1,1,2,2,3,2,2,2,2,1,1,3,3,3,3,2,2,2,1,3,
%T A002635 4,2,4,3,3,2,2,3,4,3,2,4,2,2,2,4,5,3,5,3,5,3,1,4,5,3,3,4,3,4,2,4,6,4,
%U A002635 4,4,5,2,3,5,5,5,5,4,4,3,2,6,7,4,5,5,5,4,2,5,9,5,3,5,4,3,1,6,7,6,7,5,7,5,3,6,7,4
%N A002635 Number of partitions of n into 4 squares.
%C A002635 a(A124978(n)) = n;  a(A006431(n)) = 1; a(A180149(n)) = 2; a(A245022(n)) = 3. - _Reinhard Zumkeller_, Jul 13 2014
%D A002635 G. Loria, Sulla scomposizione di un intero nella somma di numeri poligonali. (Italian) Atti Accad. Naz. Lincei. Rend. Cl. Sci. Fis. Mat. Nat. (8) 1, (1946). 7-15.
%D A002635 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A002635 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A002635 T. D. Noe, <a href="/A002635/b002635.txt">Table of n, a(n) for n = 0..10000</a>
%H A002635 E. Grosswald, <a href="http://dx.doi.org/10.1007/978-1-4613-8566-0_8">The Problem of the Uniqueness of Essentially Distinct Representations</a>, in Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 84.
%H A002635 D. H. Lehmer, <a href="http://dx.doi.org/10.1090/S0025-5718-47-99581-1">Review of Loria article</a>, Math. Comp. 2 (1947), 301-302.
%H A002635 Gino Loria, <a href="/A002635/a002635.pdf"> Sulla scomposizione di un intero nella somma di numeri poligonali. (Italian).</a> Atti Accad. Naz. Lincei. Rend. Cl. Sci. Fis. Mat. Nat. (8) 1, (1946). 7-15. Also D. H. Lehmer, Review of Loria article, Math. Comp. 2 (1947), 301-302. [Annotated scanned copies]
%H A002635 M. D. Hirschhorn, <a href="http://dx.doi.org/10.1016/S0012-365X(99)00159-4">Some formulas for partitions into squares</a>, Discrete Math, 211 (2000), pp. 225-228.
%H A002635 James A. Sellers, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL7/Sellers/sellers58.html">Partitions Excluding Specific Polygonal Numbers As Parts</a>, Journal of Integer Sequences, Vol. 7 (2004), Article 04.2.4.
%H A002635 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%e A002635 1: 1000; 2: 1100; 3:1110; 4: 2000 and 1111; 5: 2100; 6: 2110; 7: 2111; 8: 2200; 9: 3000 and 2210; 10: 3100 and 2211; etc.
%t A002635 Length[PowersRepresentations[ #, 4, 2]] & /@ Range[0, 107] (* _Ant King_, Oct 19 2010 *)
%o A002635 (PARI) for(n=1,100,print1(sum(a=0,n,sum(b=0,a,sum(c=0,b,sum(d=0,c,if(a^2+b^2+c^2+d^2-n,0,1))))),","))
%o A002635 (PARI) a(n)=local(c=0); if(n>=0, forvec(x=vector(4,k,[0,sqrtint(n)]),c+=norml2(x)==n,1)); c
%o A002635 (Haskell)
%o A002635 a002635 = p (tail a000290_list) 4 where
%o A002635 p ks'@(k:ks) c m = if m == 0 then 1 else
%o A002635 if c == 0 || m < k then 0 else p ks' (c - 1) (m - k) + p ks c m
%o A002635 -- _Reinhard Zumkeller_, Jul 13 2014
%Y A002635 Cf. A000290, A124978, A006431, A180149, A245022.
%Y A002635 Equivalent sequences for other numbers of squares: A010052 (1), A000161 (2), A000164 (3), A000174 (5), A000177 (6), A025422 (7), A025423 (8), A025424 (9), A025425 (10).
%K A002635 nonn,easy,nice
%O A002635 0,5
%A A002635 _N. J. A. Sloane_