Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #17 Nov 06 2014 09:53:55
%S 1,1,2,2,5,7,15,23,43,70,128,214,383,651,1149,1971,3457,5961,10412,
%T 18011,31384,54384,94639,164163,285454,495452,861129,1495126,2597970,
%U 4511573,7838280,13613289,23649355,41076088,71354998,123939602,215294730,373962643,649597906,1128352145
%N Number of compositions of n where no consecutive parts differ by 1.
%H Joerg Arndt and Alois P. Heinz, <a href="/A238422/b238422.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) ~ c * d^n, where c = 0.501153706040308227351395770679776260606990346633815... and d = 1.737029107886986816124470304294547513896522086125645631179... - _Vaclav Kotesovec_, Feb 26 2014
%e The a(6) = 15 such compositions are:
%e 01: [ 1 1 1 1 1 1 ]
%e 02: [ 1 1 1 3 ]
%e 03: [ 1 1 3 1 ]
%e 04: [ 1 1 4 ]
%e 05: [ 1 3 1 1 ]
%e 06: [ 1 4 1 ]
%e 07: [ 1 5 ]
%e 08: [ 2 2 2 ]
%e 09: [ 2 4 ]
%e 10: [ 3 1 1 1 ]
%e 11: [ 3 3 ]
%e 12: [ 4 1 1 ]
%e 13: [ 4 2 ]
%e 14: [ 5 1 ]
%e 15: [ 6 ]
%p # b(n, i): number of compositions of n where the leftmost part j
%p # and i do not have distance 1
%p b:= proc(n, i) option remember; `if`(n=0, 1,
%p add(`if`(abs(i-j)=1, 0, b(n-j, j)), j=1..n))
%p end:
%p a:= n-> b(n, -1):
%p seq(a(n), n=0..50);
%t 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 *)
%Y Cf. A116931 (partitions where no consecutive parts differ by 1).
%K nonn
%O 0,3
%A _Joerg Arndt_ and _Alois P. Heinz_, Feb 26 2014