login
Number of compositions of n such that the cardinality of the set of parts is 2.
4

%I #18 May 26 2014 04:27:39

%S 0,0,2,5,14,22,44,68,107,172,261,396,606,950,1414,2238,3418,5411,8368,

%T 13297,20840,33268,52549,84120,133775,214611,343025,551064,883600,

%U 1421767,2284870,3680296,5924725,9551161,15393855,24834827,40061700

%N Number of compositions of n such that the cardinality of the set of parts is 2.

%H Alois P. Heinz, <a href="/A131661/b131661.txt">Table of n, a(n) for n = 1..1000</a>

%F G.f.: Sum(Sum(x^(i+j)*(x^i+x^j-2)/((x^i-1)*(x^j-1)*(x^i+x^j-1)), j=1..i-1), i=2..infinity).

%F a(n) ~ 1/sqrt(5) * ((1+sqrt(5))/2)^(n+1). - _Vaclav Kotesovec_, May 01 2014

%p with(numtheory):

%p a:= n-> add(add(add(binomial(j+(n-i*j)/d, j), d=select(x->x<i,

%p divisors(n-i*j))), j=1..n/i), i=2..n-1):

%p seq(a(n), n=0..50); # _Alois P. Heinz_, Feb 01 2014

%t Rest@ CoefficientList[ Series[ Sum[ x^(i + j)*(x^i + x^j - 2)/((x^i - 1)*(x^j - 1)*(x^i + x^j - 1)), {i, 2, 37}, {j, i - 1}], {x, 0, 37}], x] (* _Robert G. Wilson v_, Sep 16 2007 *)

%Y Cf. A000005, A002133, A005772, A088142.

%Y Column k=2 of A235998.

%Y Cf. A242900 (with distinct multiplicities).

%K easy,nonn

%O 1,3

%A _Vladeta Jovovic_, Sep 13 2007

%E More terms from _Robert G. Wilson v_, Sep 16 2007