This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A342333 #21 Jun 10 2021 20:35:39 %S A342333 1,1,1,3,4,5,10,18,26,42,72,114,184,305,494,799,1305,2123,3446,5611, %T A342333 9134,14851,24162,39314,63945,104025,169238,275305,447863,728592, %U A342333 1185248,1928143,3136706,5102743,8301086,13504175,21968436,35737995,58138282,94578751,153859673 %N A342333 Number of compositions of n with all adjacent parts (x, y) satisfying x >= 2y or y >= 2x. %C A342333 Either quotient x/y or y/x must be >= 2. %H A342333 Alois P. Heinz, <a href="/A342333/b342333.txt">Table of n, a(n) for n = 0..2000</a> %e A342333 The a(1) = 1 through a(7) = 18 compositions: %e A342333 (1) (2) (3) (4) (5) (6) (7) %e A342333 (12) (13) (14) (15) (16) %e A342333 (21) (31) (41) (24) (25) %e A342333 (121) (131) (42) (52) %e A342333 (212) (51) (61) %e A342333 (141) (124) %e A342333 (213) (142) %e A342333 (312) (151) %e A342333 (1212) (214) %e A342333 (2121) (241) %e A342333 (313) %e A342333 (412) %e A342333 (421) %e A342333 (1213) %e A342333 (1312) %e A342333 (2131) %e A342333 (3121) %e A342333 (12121) %p A342333 b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j, j), j= %p A342333 `if`(i=0, 1..n, {$1..min(n, iquo(i, 2)), $(2*i)..n}))) %p A342333 end: %p A342333 a:= n-> b(n, 0): %p A342333 seq(a(n), n=0..42); # _Alois P. Heinz_, May 24 2021 %t A342333 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]>=2*#[[i-1]]||#[[i-1]]>=2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}] %t A342333 (* Second program: *) %t A342333 b[n_, i_] := b[n, i] = If[n == 0, 1, If[i == 0, Sum[b[n-j, j], {j, 1, n}], Sum[b[n-j, j], {j, Range[Min[n, Quotient[i, 2]]]~Union~Range[2i, n]}]]]; %t A342333 a[n_] := b[n, 0]; %t A342333 a /@ Range[0, 42] (* _Jean-François Alcover_, Jun 10 2021, after_Alois P. Heinz_ *) %Y A342333 The unordered version (partitions) is A000929. %Y A342333 Reversing operators and changing 'or' into 'and' gives A224957 (strict: A342342). %Y A342333 The version not allowing equality (i.e., strict relations) is A342332. %Y A342333 The version allowing partial equality is A342334. %Y A342333 A002843 counts compositions with adjacent parts x <= 2y. %Y A342333 A154402 counts partitions with adjacent parts x = 2y. %Y A342333 A274199 counts compositions with adjacent parts x < 2y. %Y A342333 A342094 counts partitions with adjacent parts x <= 2y (strict: A342095). %Y A342333 A342096 counts partitions without adjacent x >= 2y (strict: A342097). %Y A342333 A342098 counts partitions with adjacent parts x > 2y. %Y A342333 A342330 counts compositions with x < 2y and y < 2x (strict: A342341). %Y A342333 A342331 counts compositions with adjacent parts x = 2y or y = 2x. %Y A342333 A342335 counts compositions with adjacent parts x >= 2y or y = 2x. %Y A342333 A342337 counts partitions with adjacent parts x = y or x = 2y. %Y A342333 A342338 counts compositions with adjacent parts x < 2y and y <= 2x. %Y A342333 Cf. A003114, A003242, A034296, A167606, A342083, A342084, A342087, A342191, A342336, A342340. %K A342333 nonn %O A342333 0,4 %A A342333 _Gus Wiseman_, Mar 10 2021 %E A342333 More terms from _Joerg Arndt_, Mar 12 2021