OFFSET
2,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 2..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, where d = A241902 = 1.750241291718309031249738624639..., c = 0.04826600476992825168367... . - Vaclav Kotesovec, Sep 05 2014
G.f.: (Sum_{i>0} C(x)*x^(2*i)/(1+x^i)^2)/(1 - Sum_{i>0} x^i/(1+x^i)) where C(x) is the g.f. for A003242. - John Tyler Rascoe, May 16 2024
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]:
seq(a(n), n=2..45); # Alois P. Heinz, May 09 2014
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]];
a /@ Range[2, 45] (* Jean-François Alcover, Nov 02 2020, after Alois P. Heinz *)
PROG
(PARI)
C_x(N)={my(g=1/(1 - sum(k=1, N, x^k/(1+x^k)))); g}
A_x(N)={my(x='x+O('x^N), h=sum(i=1, N, (C_x(N)*x^(2*i))/(1+x^i)^2 )/(1-sum(i=1, N, (x^i)/(1+x^i)))); Vec(h)}
A_x(40) \\ John Tyler Rascoe, May 16 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Christian G. Bower, Apr 29 2005
EXTENSIONS
Replaced broken link, Vaclav Kotesovec, May 01 2014
STATUS
approved