cp's OEIS Frontend

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.

A342332 Number of compositions of n with all adjacent parts (x, y) satisfying x > 2y or y > 2x.

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