OFFSET
0,5
COMMENTS
Carlitz compositions are compositions where adjacent parts are distinct (see A003242).
LINKS
Joerg Arndt and Alois P. Heinz, Table of n, a(n) for n = 0..1000 (terms 0..262 from Joerg Arndt)
FORMULA
G.f.: 1/( 1 - Sum_{j>=0} x^(2j+1)/(1 + x^(2j+1)) ). - Geoffrey Critzer, Nov 21 2013
a(n) ~ c / r^n, where r = 0.708865489663179258570259601255070249415... is the root of the equation sum_{j>=0} x^(2j+1)/(1 + x^(2j+1)) = 1, c = 0.3391570949344217123793275284038135702369824934927187... . - Vaclav Kotesovec, Aug 22 2014
EXAMPLE
There are a(12) = 22 such compositions of 12:
[ 1] 1 3 1 3 1 3
[ 2] 1 3 1 7
[ 3] 1 3 5 3
[ 4] 1 3 7 1
[ 5] 1 5 1 5
[ 6] 1 7 1 3
[ 7] 1 7 3 1
[ 8] 1 11
[ 9] 3 1 3 1 3 1
[10] 3 1 3 5
[11] 3 1 5 3
[12] 3 1 7 1
[13] 3 5 1 3
[14] 3 5 3 1
[15] 3 9
[16] 5 1 5 1
[17] 5 3 1 3
[18] 5 7
[19] 7 1 3 1
[20] 7 5
[21] 9 3
[22] 11 1
MAPLE
b:= proc(n, t) option remember; `if`(n=0, 1,
add(`if`(j=t or irem(j, 2)=0, 0, b(n-j, j)), j=1..n))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..70); # Alois P. Heinz, Nov 08 2012
MATHEMATICA
nn=20; CoefficientList[Series[1/(1-Sum[z^(2j+1)/(1+z^(2j+1)), {j, 0, nn}]), {z, 0, nn}], z] (* Geoffrey Critzer, Nov 21 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Joerg Arndt, Nov 04 2012
STATUS
approved