|
|
A106357
|
|
Number of compositions of n with exactly 1 adjacent equal pair of parts.
|
|
4
|
|
|
1, 0, 3, 6, 7, 20, 42, 72, 141, 280, 516, 976, 1853, 3420, 6361, 11844, 21819, 40192, 73942, 135452, 247828, 452776, 825252, 1501998, 2730159, 4954890, 8981360, 16261568, 29408708, 53130154, 95894384, 172917788, 311538169, 560831286
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,3
|
|
LINKS
|
A. Knopfmacher and H. Prodinger, On Carlitz compositions, European Journal of Combinatorics, Vol. 19, 1998, pp. 579-589.
|
|
FORMULA
|
a(n) ~ c * d^n * n, where d = A241902 = 1.750241291718309031249738624639..., c = 0.04826600476992825168367... . - Vaclav Kotesovec, Sep 05 2014
|
|
MAPLE
|
b:= proc(n, v) option remember; `if`(n=0, [1, 0],
add((p-> `if`(i=v, [0, p[1]], p))(b(n-i, i)), i=1..n))
end:
a:= n-> b(n, 0)[2]:
|
|
MATHEMATICA
|
b[n_, v_] := b[n, v] = If[n == 0, {1, 0}, Sum[Function[p, If[i == v, {0, p[[1]]}, p]][b[n - i, i]], {i, 1, n}]];
a[n_] := b[n, 0][[2]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|