login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A025428 Number of partitions of n into 4 nonzero squares. 17
0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 3, 0, 1, 2, 0, 1, 2, 1, 2, 2, 1, 2, 1, 0, 3, 2, 1, 2, 1, 2, 1, 2, 2, 1, 4, 1, 2, 3, 0, 2, 4, 1, 3, 2, 1, 4, 1, 1, 3, 3, 2, 2, 4, 2, 1, 3, 2, 3, 4, 2, 3, 3, 1, 2, 5, 2, 4, 3, 2, 4, 1, 1, 6, 4, 3, 4, 2, 3, 0, 4, 4, 3, 5, 1, 5, 5, 1, 4, 5, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,29

COMMENTS

Records occur at n= 4, 28, 52, 82, 90, 130, 162, 198, 202, 210,.... - R. J. Mathar, Sep 15 2015

LINKS

T. D. Noe, Table of n, a(n) for n = 0..10000

FORMULA

For n>0, a(n) = ( A063730(n) + 6*A213024(n) + 3*A063725(n/2) + 8*A092573(n) + 6*A010052(n/4) ) / 24. - Max Alekseyev, Sep 30 2012

a(n) = ( A000118(n) - 4*A005875(n) - 6*A004018(n) - 12*A000122(n) - 15*A000007(n) + 12*A014455(n) - 24*A033715(n) - 12*A000122(n/2) + 12*A004018(n/2) + 32*A033716(n) - 32*A000122(n/3) + 48*A000122(n/4) ) / 384. - Max Alekseyev, Sep 30 2012

MATHEMATICA

nn = 100; lim = Sqrt[nn]; t = Table[0, {nn}]; Do[n = a^2 + b^2 + c^2 + d^2; If[n <= nn, t[[n]]++], {a, lim}, {b, a, lim}, {c, b, lim}, {d, c, lim}]; t (* T. D. Noe, Sep 28 2012 *)

f[n_] := Length@ IntegerPartitions[n, {4}, Range[ Floor[ Sqrt[n - 1]]]^2]; Array[f, 105] (* Robert G. Wilson v, Sep 28 2012 *)

PROG

(PARI) A025428(n)=sum(a=1, n, sum(b=1, a, sum(c=1, b, sum(d=1, c, a^2+b^2+c^2+d^2==n))))

(PARI) A025428(n)=sum(a=1, sqrtint(max(n-3, 0)), sum(b=1, min(sqrtint(n-a^2-2), a), sum(c=1, min(sqrtint(n-a^2-b^2-1), b), issquare(n-a^2-b^2-c^2, &d) & d <= c )))

(PARI) A025428(n)=sum(a=sqrtint(max(n, 4)\4), sqrtint(max(n-3, 0)), sum(b=sqrtint((n-a^2)\3-1)+1, min(sqrtint(n-a^2-2), a), sum(c=sqrtint((t=n-a^2-b^2)\2-1)+1, min(sqrtint(t-1), b), issquare(t-c^2) ))) \\ - M. F. Hasler, Sep 17 2012

for(n=1, 100, print1(A025428(n), ", "))

(PARI) T(n)={a=matrix(n, 4, i, j, 0); for(d=1, sqrtint(n), forstep(i=n, d*d+1, -1, for(j=2, 4, a[i, j]+=sum(k=1, j, if(k<j&&i-k*d*d>0, a[i-k*d*d, j-k], if(k==j&&i-k*d*d==0, 1))))); a[d*d, 1]=1); for(i=1, n, print(i" "a[i, 4]))} /* Robert Gerbicz, Sep 28 2012 */

CROSSREFS

Cf. A000414, A000534, A025357-A025375, A216374, A025416 (greedy inverse).

Column k=4 of A243148.

Sequence in context: A160499 A274876 A065718 * A199176 A021336 A100749

Adjacent sequences:  A025425 A025426 A025427 * A025429 A025430 A025431

KEYWORD

nonn

AUTHOR

David W. Wilson

EXTENSIONS

Values of a(0..10^4) double-checked by M. F. Hasler, Sep 17 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified November 19 16:10 EST 2017. Contains 294936 sequences.