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.

A349798 Number of weakly alternating ordered prime factorizations of n with at least two adjacent equal parts.

This page as a plain text file.
%I A349798 #9 Dec 18 2021 14:56:21
%S A349798 0,0,0,1,0,0,0,1,1,0,0,2,0,0,0,1,0,2,0,2,0,0,0,4,1,0,1,2,0,0,0,1,0,0,
%T A349798 0,2,0,0,0,4,0,0,0,2,2,0,0,5,1,2,0,2,0,4,0,4,0,0,0,2,0,0,2,1,0,0,0,2,
%U A349798 0,0,0,5,0,0,2,2,0,0,0,5,1,0,0,2,0,0,0
%N A349798 Number of weakly alternating ordered prime factorizations of n with at least two adjacent equal parts.
%C A349798 We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. This sequence counts permutations of prime factors that are weakly but not strongly alternating. Alternating permutations of multisets are a generalization of alternating or up-down permutations of {1..n}.
%H A349798 Wikipedia, <a href="https://en.wikipedia.org/wiki/Alternating_permutation">Alternating permutation</a>
%e A349798 Using prime indices instead of factors, the a(n) ordered prime factorizations for selected n are:
%e A349798 n = 4    12    24     48      90     120     192       240      270
%e A349798    ------------------------------------------------------------------
%e A349798     11   112   1112   11112   1223   11132   1111112   111132   12232
%e A349798          211   1121   11121   1322   11213   1111121   111213   13222
%e A349798                1211   11211   2213   11312   1111211   111312   21223
%e A349798                2111   12111   2231   21113   1112111   112131   21322
%e A349798                       21111   3122   21311   1121111   113121   22132
%e A349798                               3221   23111   1211111   121113   22213
%e A349798                                      31112   2111111   121311   22231
%e A349798                                      31211             131112   22312
%e A349798                                                        131211   23122
%e A349798                                                        211131   23221
%e A349798                                                        213111   31222
%e A349798                                                        231111   32212
%e A349798                                                        311121
%e A349798                                                        312111
%t A349798 primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
%t A349798 whkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}];
%t A349798 Table[Length[Select[Permutations[primeMS[n]],(whkQ[#]||whkQ[-#])&&MatchQ[#,{___,x_,x_,___}]&]],{n,100}]
%Y A349798 This is the weakly but not strictly alternating case of A008480.
%Y A349798 Including alternating (in fact, anti-run) permutations gives A349056.
%Y A349798 These partitions are counted by A349795, ranked by A350137.
%Y A349798 A complementary version is A349796, ranked by A350140.
%Y A349798 The version for compositions is A349800, ranked by A349799.
%Y A349798 A001250 = alternating permutations, ranked by A349051, complement A348615.
%Y A349798 A025047/A025048/A025049 = alternating compositions, ranked by A345167.
%Y A349798 A056239 adds up prime indices, row sums of A112798, row lengths A001222.
%Y A349798 A335452 = anti-run ordered prime factorizations.
%Y A349798 A344652 = ordered prime factorizations w/o weakly increasing triples.
%Y A349798 A345164 = alternating ordered prime factorizations, with twins A344606.
%Y A349798 A345194 = alternating patterns, with twins A344605.
%Y A349798 A349052/A129852/A129853 = weakly alternating compositions.
%Y A349798 A349053 = non-weakly alternating compositions, ranked by A349057.
%Y A349798 A349060 = weakly alternating partitions, complement A349061.
%Y A349798 A349797 = non-weakly alternating ordered prime factorizations.
%Y A349798 Cf. A005649, A096441, A335433, A335448, A344614, A344615, A345166, A345173, A345195, A348609, A349794, A349801.
%K A349798 nonn
%O A349798 1,12
%A A349798 _Gus Wiseman_, Dec 14 2021