OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..4306
EXAMPLE
There are a(6) = 19 such compositions of 6:
01: [ 1 1 1 1 1 1 ]
02: [ 1 1 1 1 2 ]
03: [ 1 1 1 2 1 ]
04: [ 1 1 2 1 1 ]
05: [ 1 1 2 2 ]
06: [ 1 2 1 1 1 ]
07: [ 1 2 1 2 ]
08: [ 1 2 2 1 ]
09: [ 1 2 3 ]
10: [ 2 1 1 1 1 ]
11: [ 2 1 1 2 ]
12: [ 2 1 2 1 ]
13: [ 2 2 1 1 ]
14: [ 2 2 2 ]
15: [ 2 4 ]
16: [ 3 2 1 ]
17: [ 3 3 ]
18: [ 4 2 ]
19: [ 6 ]
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, add(
b(n-j, j), j=`if`(i=0, 1..n, ceil(i/2)..min(n, 2*i))))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..42); # Alois P. Heinz, Mar 15 2021
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@Table[#[[i]]<=2*#[[i-1]]&&#[[i-1]]<=2*#[[i]], {i, 2, Length[#]}]&]], {n, 15}] (* Gus Wiseman, Mar 12 2021 *)
b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - j, j], {j, If[i == 0, Range[n], Range[Ceiling[i/2], Min[n, 2*i]]]}]];
a[n_] := b[n, 0];
a /@ Range[0, 42] (* Jean-François Alcover, May 24 2021, after Alois P. Heinz *)
CROSSREFS
The strict case is A342342.
A000929 counts partitions with adjacent parts x >= 2y.
A002843 counts compositions with adjacent parts x <= 2y.
A045690 counts sets with maximum n with adjacent elements y < 2x.
A154402 counts partitions with adjacent parts x = 2y.
A274199 counts compositions with adjacent parts x < 2y.
A342098 counts partitions with adjacent parts x > 2y.
A342331 counts compositions with adjacent parts x = 2y or y = 2x.
A342332 counts compositions with adjacent parts x > 2y or y > 2x.
A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
A342334 counts compositions with adjacent parts x >= 2y or y > 2x.
A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
A342336 counts compositions with adjacent parts x > 2y or y = 2x.
A342337 counts partitions with adjacent parts x = y or x = 2y.
A342338 counts compositions with adjacent parts x < 2y and y <= 2x.
A342340 counts compositions with adjacent x = y or x = 2y or y = 2x.
KEYWORD
nonn
AUTHOR
Joerg Arndt, Apr 21 2013
EXTENSIONS
Name corrected by Gus Wiseman, Mar 11 2021
STATUS
approved