OFFSET
3,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 3..1000
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^2, where d = 1.7502412917183090312497386246... (see A241902), c = 0.0025523594118210599072896951... . - Vaclav Kotesovec, Aug 25 2014
MAPLE
b:= proc(n, v) option remember; `if`(n=0, [1, 0$2], add((
p->`if`(i=v, [0, p[1..2][]], p))(b(n-i, i)), i=1..n))
end:
a:= n-> b(n, 0)[3]:
seq(a(n), n=3..45); # Alois P. Heinz, Jun 24 2014
MATHEMATICA
b[n_, v_] := b[n, v] = If[n==0, {1, 0, 0}, Sum[If[i==v, Prepend[#[[1;; 2]], 0], #]&[b[n-i, i]], {i, 1, n}]];
a[n_] := b[n, 0][[3]];
a /@ Range[3, 45] (* Jean-François Alcover, Nov 18 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Christian G. Bower, Apr 29 2005
STATUS
approved