login
A239960
Number of partitions of n such that (number of distinct parts) = number of 1s.
3
1, 1, 0, 0, 1, 1, 2, 1, 4, 2, 6, 6, 8, 10, 16, 15, 22, 32, 31, 47, 54, 72, 81, 111, 123, 166, 189, 244, 274, 366, 411, 509, 614, 736, 872, 1056, 1256, 1479, 1785, 2099, 2479, 2942, 3498, 4028, 4870, 5600, 6655, 7712, 9127, 10512, 12431, 14327, 16776, 19401
OFFSET
0,7
LINKS
EXAMPLE
a(8) counts these 4 partitions : 611, 3311, 32111, 22211.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1)+`if`(i=1, 0, add(b(n-1-i*j, i-1), j=1..(n-1)/i))))
end:
a:= n-> `if`(n=0, 1, b(n-1$2)):
seq(a(n), n=0..70); # Alois P. Heinz, Apr 03 2014
MATHEMATICA
z = 54; d[p_] := d[p] = Length[DeleteDuplicates[p]]; Table[Count[IntegerPartitions[n], p_ /; d[p] == Count[p, 1]], {n, 0, z}]
(* Second program: *)
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1] + If[i == 1, 0, Sum[b[n - 1 - i*j, i - 1], {j, 1, (n - 1)/i}]]]]; a[n_] := If[n == 0, 1, b[n - 1, n - 1]]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A176837 A339241 A007690 * A330001 A292402 A353132
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 30 2014
STATUS
approved