%I #17 Dec 20 2020 03:53:26
%S 1,1,2,4,7,14,26,52,101,200,396,787,1564,3117,6214,12398,24749,49427,
%T 98740,197303,394323,788201,1575695,3150265,6298732,12594595,25184598,
%U 50361842,100711888,201404839,402779246,805509560,1610940381,3221753990
%N Number of compositions [p(1), p(2), ..., p(k)] of n such that p(j) >= p(1) - 1
%H Alois P. Heinz, <a href="/A224960/b224960.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) ~ 3 * 2^(n-3). - _Vaclav Kotesovec_, May 01 2014
%e The a(5) = 14 such compositions of 5 are
%e 01: [ 1 1 1 1 1 ]
%e 02: [ 1 1 1 2 ]
%e 03: [ 1 1 2 1 ]
%e 04: [ 1 1 3 ]
%e 05: [ 1 2 1 1 ]
%e 06: [ 1 2 2 ]
%e 07: [ 1 3 1 ]
%e 08: [ 1 4 ]
%e 09: [ 2 1 1 1 ]
%e 10: [ 2 1 2 ]
%e 11: [ 2 2 1 ]
%e 12: [ 2 3 ]
%e 13: [ 3 2 ]
%e 14: [ 5 ]
%e (the two forbidden compositions are [ 3 1 1 ] and [ 4 1 ]).
%p b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j,
%p `if`(i=0, max(1, j-1), i)), j=`if`(i=0, 1, i)..n))
%p end:
%p a:= n-> b(n, 0):
%p seq(a(n), n=0..50); # _Alois P. Heinz_, May 02 2013
%t b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - j, If[i == 0, Max[1, j - 1], i]], {j, If[i == 0, 1, i], n}]];
%t a[n_] := b[n, 0];
%t a /@ Range[0, 50] (* _Jean-François Alcover_, Dec 20 2020, after _Alois P. Heinz_ *)
%Y Cf. A171682 (compositions such that p(j) >= p(1)).
%Y Cf. A079501 (compositions such that p(j) > p(1)).
%Y Cf. A048888 (compositions such that p(j) <= p(1) + 1).
%Y Cf. A007059 (compositions such that p(j) < p(1)).
%Y Cf. A079500 (compositions such that p(j) <= p(1)).
%K nonn
%O 0,3
%A _Joerg Arndt_, Apr 21 2013