login
A342332
Number of compositions of n with all adjacent parts (x, y) satisfying x > 2y or y > 2x.
15
1, 1, 1, 1, 3, 4, 4, 7, 12, 17, 23, 34, 51, 75, 111, 164, 239, 350, 520, 767, 1123, 1652, 2439, 3587, 5263, 7745, 11411, 16789, 24695, 36347, 53489, 78686, 115779, 170390, 250711, 368866, 542783, 798713, 1175208, 1729189, 2544462, 3744077, 5509068, 8106165, 11927785, 17550956, 25824938, 37999743, 55914293, 82274088, 121060721
OFFSET
0,5
LINKS
EXAMPLE
The a(1) = 1 through a(9) = 17 compositions:
(1) (2) (3) (4) (5) (6) (7) (8) (9)
(13) (14) (15) (16) (17) (18)
(31) (41) (51) (25) (26) (27)
(131) (141) (52) (62) (72)
(61) (71) (81)
(151) (152) (162)
(313) (161) (171)
(251) (252)
(314) (261)
(413) (315)
(1313) (414)
(3131) (513)
(1314)
(1413)
(3141)
(4131)
(13131)
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j, j),
j=select(x-> i=0 or x>2*i or i>2*x , {$1..n})))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..50); # Alois P. Heinz, May 24 2021
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@Table[#[[i]]>2*#[[i-1]]||#[[i-1]]>2*#[[i]], {i, 2, Length[#]}]&]], {n, 0, 15}]
(* Second program: *)
b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - j, j], {j, Select[Range[n], i == 0 || # > 2 i || i > 2 # &]}]];
a[n_] := b[n, 0];
a /@ Range[0, 50] (* Jean-François Alcover, Jun 09 2021, after Alois P. Heinz *)
CROSSREFS
The unordered version (partitions) is A342098.
Reversing operators and changing 'or' into 'and' gives A342330 (strict: A342341).
The version allowing equality (i.e., non-strict relations) is A342333.
The version allowing partial equality is counted by A342334.
A000929 counts partitions with adjacent parts x >= 2y.
A002843 counts compositions with adjacent parts x <= 2y.
A154402 counts partitions with adjacent parts x = 2y.
A224957 counts compositions with x <= 2y and y <= 2x (strict: A342342).
A274199 counts compositions with adjacent parts x < 2y.
A342094 counts partitions with adjacent parts x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342331 counts compositions with adjacent parts x = 2y or y = 2x.
A342335 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.
Sequence in context: A231343 A121924 A241740 * A225738 A186679 A275742
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 10 2021
EXTENSIONS
More terms from Joerg Arndt, Mar 12 2021
STATUS
approved