%I #17 Apr 08 2015 13:15:20
%S 1,1,2,3,6,9,18,29,53,91,162,277,495,855,1508,2625,4618,8049,14130,
%T 24675,43255,75621,132475,231697,405751,709887,1242824,2174763,
%U 3806989,6662291,11661737,20409409,35723307,62521919,109431810,191527623,335225350,586717615
%N Number of compositions [p(1), p(2), ..., p(k)] of n such that p(j) != p(j-2)
%H Alois P. Heinz, <a href="/A224958/b224958.txt">Table of n, a(n) for n = 0..500</a>
%F a(n) ~ c * d^n, where d = 1.7502412917183090312497386246... (see A241902) and c = 0.5940298439978189763822100914... - _Vaclav Kotesovec_, May 01 2014
%e The a(6) = 18 such compositions of 6 are
%e 01: [ 1 1 2 2 ]
%e 02: [ 1 1 4 ]
%e 03: [ 1 2 2 1 ]
%e 04: [ 1 2 3 ]
%e 05: [ 1 3 2 ]
%e 06: [ 1 5 ]
%e 07: [ 2 1 1 2 ]
%e 08: [ 2 1 3 ]
%e 09: [ 2 2 1 1 ]
%e 10: [ 2 3 1 ]
%e 11: [ 2 4 ]
%e 12: [ 3 1 2 ]
%e 13: [ 3 2 1 ]
%e 14: [ 3 3 ]
%e 15: [ 4 1 1 ]
%e 16: [ 4 2 ]
%e 17: [ 5 1 ]
%e 18: [ 6 ]
%p b:= proc(n, i, j) option remember; `if`(n=0, 1, add(`if`(k=j, 0,
%p b(n-k, `if`(n-k<k, 0, k), `if`(n-k<i, 0, i))), k=1..n))
%p end:
%p a:= n-> b(n, 0, 0):
%p seq(a(n), n=0..50); # _Alois P. Heinz_, May 02 2013
%t b[n_, i_, j_] := b[n, i, j] = If[n==0, 1, Sum[If[k==j, 0, b[n-k, If[n-k < k, 0, k], If[n-k < i, 0, i]]], {k, 1, n}]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Apr 08 2015, after _Alois P. Heinz_ *)
%Y Cf. A000726 (partitions such that p(j) != p(j-2)), A003242, A241902.
%K nonn
%O 0,3
%A _Joerg Arndt_, Apr 21 2013