%I #23 Jun 09 2021 16:25:17
%S 1,1,1,1,3,4,4,7,12,17,23,34,51,75,111,164,239,350,520,767,1123,1652,
%T 2439,3587,5263,7745,11411,16789,24695,36347,53489,78686,115779,
%U 170390,250711,368866,542783,798713,1175208,1729189,2544462,3744077,5509068,8106165,11927785,17550956,25824938,37999743,55914293,82274088,121060721
%N Number of compositions of n with all adjacent parts (x, y) satisfying x > 2y or y > 2x.
%H Alois P. Heinz, <a href="/A342332/b342332.txt">Table of n, a(n) for n = 0..2500</a>
%e The a(1) = 1 through a(9) = 17 compositions:
%e (1) (2) (3) (4) (5) (6) (7) (8) (9)
%e (13) (14) (15) (16) (17) (18)
%e (31) (41) (51) (25) (26) (27)
%e (131) (141) (52) (62) (72)
%e (61) (71) (81)
%e (151) (152) (162)
%e (313) (161) (171)
%e (251) (252)
%e (314) (261)
%e (413) (315)
%e (1313) (414)
%e (3131) (513)
%e (1314)
%e (1413)
%e (3141)
%e (4131)
%e (13131)
%p b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j, j),
%p j=select(x-> i=0 or x>2*i or i>2*x , {$1..n})))
%p end:
%p a:= n-> b(n, 0):
%p seq(a(n), n=0..50); # _Alois P. Heinz_, May 24 2021
%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]>2*#[[i-1]]||#[[i-1]]>2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}]
%t (* Second program: *)
%t 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 # &]}]];
%t a[n_] := b[n, 0];
%t a /@ Range[0, 50] (* _Jean-François Alcover_, Jun 09 2021, after _Alois P. Heinz_ *)
%Y The unordered version (partitions) is A342098.
%Y Reversing operators and changing 'or' into 'and' gives A342330 (strict: A342341).
%Y The version allowing equality (i.e., non-strict relations) is A342333.
%Y The version allowing partial equality is counted by A342334.
%Y A000929 counts partitions with adjacent parts x >= 2y.
%Y A002843 counts compositions with adjacent parts x <= 2y.
%Y A154402 counts partitions with adjacent parts x = 2y.
%Y A224957 counts compositions with x <= 2y and y <= 2x (strict: A342342).
%Y A274199 counts compositions with adjacent parts x < 2y.
%Y A342094 counts partitions with adjacent parts x <= 2y (strict: A342095).
%Y A342096 counts partitions without adjacent x >= 2y (strict: A342097).
%Y A342331 counts compositions with adjacent parts x = 2y or y = 2x.
%Y A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
%Y A342337 counts partitions with adjacent parts x = y or x = 2y.
%Y A342338 counts compositions with adjacent parts x < 2y and y <= 2x.
%Y Cf. A003114, A003242, A034296, A167606, A342083, A342084, A342087, A342191, A342336, A342340.
%K nonn
%O 0,5
%A _Gus Wiseman_, Mar 10 2021
%E More terms from _Joerg Arndt_, Mar 12 2021