|
|
A111178
|
|
Number of partitions of n into positive numbers one less than a square.
|
|
7
|
|
|
1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 4, 1, 2, 4, 1, 2, 5, 2, 4, 5, 2, 5, 5, 2, 6, 7, 4, 6, 7, 5, 6, 8, 6, 8, 12, 6, 9, 13, 6, 10, 15, 8, 14, 15, 9, 16, 16, 10, 18, 21, 14, 19, 22, 16, 20, 24, 19, 25, 30, 20, 27, 33, 21, 29, 39, 26, 37, 40, 28, 42, 42, 31, 48
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,16
|
|
COMMENTS
|
Also limiting form of the number of representations of n into k positive squares for k decreasing from n to 1, or Table[Count[SumOfSquaresRepresentations[k,n], {a_,__}/;a>0], {n,100,100}, {k,100,40,-1}]. (Franklin T. Adams-Watters: replacing k^2 ones by the value k^2 changes the count by k^2-1).
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Product_{k>=2} 1/(1-x^(k^2-1)).
|
|
MAPLE
|
b:= proc(n, i) option remember;
`if`(n=0, 1, `if`(i<2, 0, b(n, i-1)+
`if`(i^2>n+1, 0, b(n+1-i^2, i))))
end:
a:= n-> b(n, isqrt(n)):
|
|
MATHEMATICA
|
nn = 100; CoefficientList[Series[Product[1/(1 - x^(k^2 - 1)), {k, 2, nn}], {x, 0, nn}], x] (* corrected by T. D. Noe, Feb 22 2012 *)
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<2, 0, b[n, i-1] + If[i^2>n+1, 0, b[n+1-i^2, i]]]]; a[n_] := b[n, Round[Sqrt[n]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 16 2017, after Alois P. Heinz *)
|
|
PROG
|
(Haskell)
a111178 = p $ tail a005563_list where
p _ 0 = 1
p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|