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 A344604 #26 Jan 31 2024 15:55:43 %S A344604 1,1,2,3,5,7,13,19,30,48,76,118,187,293,461,725,1140,1789,2815,4422, %T A344604 6950,10924,17169,26979,42405,66644,104738,164610,258708,406588, %U A344604 639010,1004287,1578364,2480606,3898600,6127152,9629624,15134213,23785389,37381849,58750469 %N A344604 Number of alternating compositions of n, including twins (x,x). %C A344604 We define a composition to be alternating including twins (x,x) if there are no adjacent triples (..., x, y, z, ...) where x <= y <= z or x >= y >= z. Except in the case of twins (x,x), all such compositions are anti-runs (A003242). These compositions avoid the weak consecutive patterns (1,2,3) and (3,2,1), the strict version being A344614. %C A344604 The version without twins (x,x) is A025047 (alternating compositions). %H A344604 Andrew Howroyd, <a href="/A344604/b344604.txt">Table of n, a(n) for n = 0..1000</a> %F A344604 a(n > 0) = A025047(n) + 1 if n is even, otherwise A025047(n). - _Gus Wiseman_, Nov 03 2021 %e A344604 The a(1) = 1 through a(7) = 19 compositions: %e A344604 (1) (2) (3) (4) (5) (6) (7) %e A344604 (11) (12) (13) (14) (15) (16) %e A344604 (21) (22) (23) (24) (25) %e A344604 (31) (32) (33) (34) %e A344604 (121) (41) (42) (43) %e A344604 (131) (51) (52) %e A344604 (212) (132) (61) %e A344604 (141) (142) %e A344604 (213) (151) %e A344604 (231) (214) %e A344604 (312) (232) %e A344604 (1212) (241) %e A344604 (2121) (313) %e A344604 (412) %e A344604 (1213) %e A344604 (1312) %e A344604 (2131) %e A344604 (3121) %e A344604 (12121) %t A344604 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{___,x_,y_,z_,___}/;x<=y<=z||x>=y>=z]&]],{n,0,15}] %Y A344604 A001250 counts alternating permutations. %Y A344604 A005649 counts anti-run patterns. %Y A344604 A025047 counts alternating or wiggly compositions, also A025048, A025049. %Y A344604 A106356 counts compositions by number of maximal anti-runs. %Y A344604 A114901 counts compositions where each part is adjacent to an equal part. %Y A344604 A325534 counts separable partitions. %Y A344604 A325535 counts inseparable partitions. %Y A344604 A344605 counts alternating patterns including twins. %Y A344604 A344606 counts alternating permutations of prime factors including twins. %Y A344604 Counting compositions by patterns: %Y A344604 - A011782 no conditions. %Y A344604 - A003242 avoiding (1,1) adjacent. %Y A344604 - A102726 avoiding (1,2,3). %Y A344604 - A106351 avoiding (1,1) adjacent by sum and length. %Y A344604 - A128695 avoiding (1,1,1) adjacent. %Y A344604 - A128761 avoiding (1,2,3) adjacent. %Y A344604 - A232432 avoiding (1,1,1). %Y A344604 - A335456 all patterns. %Y A344604 - A335457 all patterns adjacent. %Y A344604 - A335514 matching (1,2,3). %Y A344604 - A344614 avoiding (1,2,3) and (3,2,1) adjacent. %Y A344604 - A344615 weakly avoiding (1,2,3) adjacent. %Y A344604 Cf. A000041, A006330, A008965, A238279, A239830, A333213, A238279/A333755, A344612, A344616, A344617, A344618. %K A344604 nonn %O A344604 0,3 %A A344604 _Gus Wiseman_, May 27 2021 %E A344604 a(21)-a(40) from _Alois P. Heinz_, Nov 04 2021