OFFSET
0,5
COMMENTS
The Heinz numbers of these integer partitions are given by A324525. - Gus Wiseman, Mar 09 2019
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
FORMULA
G.f.: Product_{k>=1} (1-x^k+x^(k^2))/(1-x^k).
EXAMPLE
a(9)=5 because we have [3,3,3], [2,2,2,2,1], [2,2,2,1,1,1], [2,2,1,1,1,1,1] and [1,1,1,1,1,1,1,1,1].
From Gus Wiseman, Mar 09 2019: (Start)
The a(1) = 1 through a(9) = 5 integer partitions:
1 11 111 22 221 222 2221 2222 333
1111 11111 2211 22111 22211 22221
111111 1111111 221111 222111
11111111 2211111
111111111
(End)
MAPLE
g:=product((1-x^k+x^(k^2))/(1-x^k), k=1..100): gser:=series(g, x=0, 70): seq(coeff(gser, x, n), n=0..66);
# second Maple program:
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1) +add(b(n-i*j, i-1), j=i..n/i)))
end:
a:= n-> b(n$2):
seq(a(n), n=0..80); # Alois P. Heinz, Dec 28 2016
MATHEMATICA
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + Sum[b[n-i*j, i-1], {j, i, n/i}]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Feb 03 2017, after Alois P. Heinz *)
Table[Length[Select[IntegerPartitions[n], And@@Table[Count[#, i]>=i, {i, Union[#]}]&]], {n, 0, 30}] (* Gus Wiseman, Mar 09 2019 *)
nmax = 100; CoefficientList[Series[Product[(1-x^k+x^(k^2))/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jan 28 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Mar 06 2006
STATUS
approved