login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of partitions of n with up to two distinct kinds of 1.
2

%I #15 Apr 24 2021 09:55:19

%S 1,2,2,3,5,7,10,14,19,26,35,46,61,80,103,133,171,217,275,347,435,544,

%T 677,838,1036,1276,1564,1913,2334,2837,3441,4163,5022,6046,7262,8701,

%U 10407,12421,14792,17586,20871,24721,29234,34514,40679,47874,56256,66003

%N Number of partitions of n with up to two distinct kinds of 1.

%H Alois P. Heinz, <a href="/A320689/b320689.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) ~ Pi * exp(Pi*sqrt(2*n/3)) / (3 * sqrt(2) * n^(3/2)). - _Vaclav Kotesovec_, Oct 24 2018

%F G.f.: (1 + x)^2 * Product_{k>=2} 1 / (1 - x^k). - _Ilya Gutkovskiy_, Apr 24 2021

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

%p binomial(2, n), `if`(i>n, 0, b(n-i, i))+b(n, i-1))

%p end:

%p a:= n-> b(n$2):

%p seq(a(n), n=0..60);

%t b[n_, i_] := b[n, i] = If[n == 0 || i == 1, Binomial[2, n], If[i > n, 0, b[n - i, i]] + b[n, i - 1]];

%t a[n_] := b[n, n];

%t a /@ Range[0, 60] (* _Jean-François Alcover_, Dec 14 2020, after _Alois P. Heinz_ *)

%Y Column k=2 of A292622.

%K nonn

%O 0,2

%A _Alois P. Heinz_, Oct 19 2018