login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239961 Number of partitions of n such that (number of distinct parts) = number of 2's. 2
1, 0, 1, 0, 0, 1, 1, 2, 2, 2, 4, 4, 6, 9, 10, 12, 19, 21, 24, 36, 44, 49, 66, 81, 100, 123, 144, 180, 229, 265, 317, 391, 473, 566, 675, 798, 968, 1154, 1354, 1621, 1926, 2241, 2675, 3170, 3691, 4345, 5113, 5956, 7002, 8182, 9503, 11095, 12919, 14976, 17446 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,8
LINKS
EXAMPLE
a(10) counts these 4 partitions : 622, 3322, 32221, 22111111.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1)+`if`(i=2, 0, add(b(n-2-i*j, i-1), j=1..(n-2)/i))))
end:
a:= n-> `if`(n=0, 1, b(n-2$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, 2]], {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 == 2, 0, Sum[b[n-2-i*j, i-1], {j, 1, (n-2)/i}]]]];
a[n_] := If[n == 0, 1, b[n-2, n-2]];
a /@ Range[0, 70] (* Jean-François Alcover, Jun 05 2021, after Alois P. Heinz *)
CROSSREFS
Cf. A239960.
Sequence in context: A326458 A326544 A326683 * A365541 A308855 A301588
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 30 2014
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:28 EDT 2024. Contains 371916 sequences. (Running on oeis4.)