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.

A348377 Number of non-alternating compositions of n, excluding twins (x,x).

This page as a plain text file.
%I A348377 #21 Jan 31 2024 15:57:48
%S A348377 0,0,0,1,3,9,19,45,98,208,436,906,1861,3803,7731,15659,31628,63747,
%T A348377 128257,257722,517338,1037652,2079983,4167325,8346203,16710572,
%U A348377 33449694,66944254,133959020,268028868,536231902,1072737537,2145905284,4292486690,8586035992
%N A348377 Number of non-alternating compositions of n, excluding twins (x,x).
%C A348377 First differs from A348382 at a(6) = 19, A348382(6) = 17. The two non-alternating non-twin compositions of 6 that are not an anti-run are (1,2,3) and (3,2,1).
%C A348377 A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2). Alternating permutations of multisets are a generalization of alternating or up-down permutations of {1..n}.
%H A348377 Andrew Howroyd, <a href="/A348377/b348377.txt">Table of n, a(n) for n = 0..1000</a>
%H A348377 Wikipedia, <a href="https://en.wikipedia.org/wiki/Alternating_permutation">Alternating permutation</a>
%F A348377 For n > 0, a(n) = A345192(n) - 1 if n is even; otherwise A345192(n).
%e A348377 The a(3) = 1 through a(6) = 19 compositions:
%e A348377   (1,1,1)  (1,1,2)    (1,1,3)      (1,1,4)
%e A348377            (2,1,1)    (1,2,2)      (1,2,3)
%e A348377            (1,1,1,1)  (2,2,1)      (2,2,2)
%e A348377                       (3,1,1)      (3,2,1)
%e A348377                       (1,1,1,2)    (4,1,1)
%e A348377                       (1,1,2,1)    (1,1,1,3)
%e A348377                       (1,2,1,1)    (1,1,2,2)
%e A348377                       (2,1,1,1)    (1,1,3,1)
%e A348377                       (1,1,1,1,1)  (1,2,2,1)
%e A348377                                    (1,3,1,1)
%e A348377                                    (2,1,1,2)
%e A348377                                    (2,2,1,1)
%e A348377                                    (3,1,1,1)
%e A348377                                    (1,1,1,1,2)
%e A348377                                    (1,1,1,2,1)
%e A348377                                    (1,1,2,1,1)
%e A348377                                    (1,2,1,1,1)
%e A348377                                    (2,1,1,1,1)
%e A348377                                    (1,1,1,1,1,1)
%t A348377 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],MatchQ[#,{___,x_,y_,z_,___}/;x<=y<=z||x>=y>=z]&]],{n,0,15}]
%Y A348377 The version for patterns is A000670(n) - A344605(n).
%Y A348377 Non-twin compositions are counted by A051049.
%Y A348377 The complement is counted by A344604.
%Y A348377 An unordered version is A344654.
%Y A348377 The complement is ranked by A345167 \/ A007582.
%Y A348377 These compositions are ranked by A345168 \ A007582.
%Y A348377 Including twins gives A345192, complement A025047.
%Y A348377 The version for factorizations is A347706, or A348380 with twins.
%Y A348377 The non-anti-run case is A348382.
%Y A348377 A001250 counts alternating permutations.
%Y A348377 A011782 counts compositions, strict A032020.
%Y A348377 A106356 counts compositions by number of maximal anti-runs.
%Y A348377 A114901 counts compositions where each part is adjacent to an equal part.
%Y A348377 A261983 counts non-anti-run compositions, complement A003242.
%Y A348377 A325535 counts inseparable partitions, ranked by A335448.
%Y A348377 A344614 counts compositions avoiding (1,2,3) and (3,2,1) adjacent.
%Y A348377 A345165 = partitions with no alternating permutations, ranked by A345171.
%Y A348377 A345170 = partitions with an alternating permutation, ranked by A345172.
%Y A348377 Cf. A005649, A178470, A238279, A333755, A335126, A344653, A344740, A345166, A345169, A345173, A348379, A348381.
%K A348377 nonn
%O A348377 0,5
%A A348377 _Gus Wiseman_, Oct 26 2021
%E A348377 a(26) onwards from _Andrew Howroyd_, Jan 31 2024