|
|
A025429
|
|
Number of partitions of n into 5 nonzero squares.
|
|
18
|
|
|
0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 0, 1, 3, 1, 3, 2, 1, 3, 2, 1, 3, 3, 2, 3, 2, 2, 2, 2, 3, 3, 5, 2, 2, 5, 1, 3, 5, 1, 5, 4, 2, 5, 3, 2, 5, 5, 3, 4, 4, 4, 3, 5, 4, 4, 7, 3, 5, 6, 2, 4, 7, 4, 7, 6, 3, 7, 4, 3, 8, 6, 5, 7, 5, 5, 4, 6, 7, 6, 9, 5, 6, 8, 2, 8
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,21
|
|
COMMENTS
|
a(33) is the last zero in this sequence, cf. the link to Mathematics Stack Exchange and also A080673(n) for the largest index k with a(k)=n. - M. F. Hasler, May 30 2014
First occurrence of k beginning with 0: 0, 5, 20, 29, 62, 53, 80, 77, 91, 101, ..., (A080654). - Robert G. Wilson v, May 30 2014
|
|
LINKS
|
|
|
FORMULA
|
a(n) = [x^n y^5] Product_{k>=1} 1/(1 - y*x^(k^2)). - Ilya Gutkovskiy, Apr 19 2019
|
|
MAPLE
|
b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
`if`(i<1 or t<1, 0, b(n, i-1, t)+
`if`(i^2>n, 0, b(n-i^2, i, t-1))))
end:
a:= n-> b(n, isqrt(n), 5):
|
|
MATHEMATICA
|
f[n_] := Block[{c = Range@ Sqrt@ n^2}, Length@ IntegerPartitions[n, {5}, c]]; Array[f, 105, 0] (* Robert G. Wilson v, May 30 2014 *)
b[n_, i_, t_] := b[n, i, t] = If[n==0, If[t==0, 1, 0], If[i<1 || t<1, 0, b[n, i-1, t] + If[i^2>n, 0, b[n-i^2, i, t-1]]]]; a[n_] := b[n, Sqrt[n] // Floor, 5]; Table[a[n], {n, 0, 120}] (* Jean-François Alcover, Oct 12 2015, after Alois P. Heinz *)
|
|
PROG
|
(PARI) A025429(n)=sum(d=sqrtint(max(n, 5)\5), sqrtint(max(n-4, 0)), nn=n-d^2; sum(a=sqrtint(max(nn-d^2, 4)\4), min(sqrtint(max(nn-3, 0)), d), sum(b=sqrtint((nn-a^2)\3-1)+1, min(sqrtint(nn-a^2-2), a), sum(c=sqrtint((t=nn-a^2-b^2)\2-1)+1, min(sqrtint(t-1), b), issquare(t-c^2) )))) \\ M. F. Hasler, May 30 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|