OFFSET
0,3
LINKS
Joerg Arndt and Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
a(n) ~ c * d^n, where c = 0.501153706040308227351395770679776260606990346633815... and d = 1.737029107886986816124470304294547513896522086125645631179... - Vaclav Kotesovec, Feb 26 2014
EXAMPLE
The a(6) = 15 such compositions are:
01: [ 1 1 1 1 1 1 ]
02: [ 1 1 1 3 ]
03: [ 1 1 3 1 ]
04: [ 1 1 4 ]
05: [ 1 3 1 1 ]
06: [ 1 4 1 ]
07: [ 1 5 ]
08: [ 2 2 2 ]
09: [ 2 4 ]
10: [ 3 1 1 1 ]
11: [ 3 3 ]
12: [ 4 1 1 ]
13: [ 4 2 ]
14: [ 5 1 ]
15: [ 6 ]
MAPLE
# b(n, i): number of compositions of n where the leftmost part j
# and i do not have distance 1
b:= proc(n, i) option remember; `if`(n=0, 1,
add(`if`(abs(i-j)=1, 0, b(n-j, j)), j=1..n))
end:
a:= n-> b(n, -1):
seq(a(n), n=0..50);
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[If[Abs[i - j] == 1, 0, b[n - j, j]], {j, 1, n}]]; a[n_] := b[n, -1]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Nov 06 2014, after Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Joerg Arndt and Alois P. Heinz, Feb 26 2014
STATUS
approved