login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239960 Number of partitions of n such that (number of distinct parts) =  number of 1s. 3

%I

%S 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,

%T 189,244,274,366,411,509,614,736,872,1056,1256,1479,1785,2099,2479,

%U 2942,3498,4028,4870,5600,6655,7712,9127,10512,12431,14327,16776,19401

%N Number of partitions of n such that (number of distinct parts) = number of 1s.

%H Alois P. Heinz, <a href="/A239960/b239960.txt">Table of n, a(n) for n = 0..1000</a>

%e a(8) counts these 4 partitions : 611, 3311, 32111, 22211.

%p b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,

%p b(n, i-1)+`if`(i=1, 0, add(b(n-1-i*j, i-1), j=1..(n-1)/i))))

%p end:

%p a:= n-> `if`(n=0, 1, b(n-1$2)):

%p seq(a(n), n=0..70); # _Alois P. Heinz_, Apr 03 2014

%t z = 54; d[p_] := d[p] = Length[DeleteDuplicates[p]]; Table[Count[IntegerPartitions[n], p_ /; d[p] == Count[p, 1]], {n, 0, z}]

%t (* Second program: *)

%t 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_ *)

%Y Cf. A239959, A239961.

%K nonn,easy

%O 0,7

%A _Clark Kimberling_, Mar 30 2014

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 20 15:43 EDT 2019. Contains 321345 sequences. (Running on oeis4.)