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.

Original entry on oeis.org

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, 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, 0, 0, 0, 5, 0, 0, 2, 2, 0, 0, 0, 5, 1, 0, 0, 2, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Dec 14 2021

Keywords

Comments

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}.

Examples

			Using prime indices instead of factors, the a(n) ordered prime factorizations for selected n are:
n = 4    12    24     48      90     120     192       240      270
   ------------------------------------------------------------------
    11   112   1112   11112   1223   11132   1111112   111132   12232
         211   1121   11121   1322   11213   1111121   111213   13222
               1211   11211   2213   11312   1111211   111312   21223
               2111   12111   2231   21113   1112111   112131   21322
                      21111   3122   21311   1121111   113121   22132
                              3221   23111   1211111   121113   22213
                                     31112   2111111   121311   22231
                                     31211             131112   22312
                                                       131211   23122
                                                       211131   23221
                                                       213111   31222
                                                       231111   32212
                                                       311121
                                                       312111
		

Crossrefs

This is the weakly but not strictly alternating case of A008480.
Including alternating (in fact, anti-run) permutations gives A349056.
These partitions are counted by A349795, ranked by A350137.
A complementary version is A349796, ranked by A350140.
The version for compositions is A349800, ranked by A349799.
A001250 = alternating permutations, ranked by A349051, complement A348615.
A025047/A025048/A025049 = alternating compositions, ranked by A345167.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
A335452 = anti-run ordered prime factorizations.
A344652 = ordered prime factorizations w/o weakly increasing triples.
A345164 = alternating ordered prime factorizations, with twins A344606.
A345194 = alternating patterns, with twins A344605.
A349052/A129852/A129853 = weakly alternating compositions.
A349053 = non-weakly alternating compositions, ranked by A349057.
A349060 = weakly alternating partitions, complement A349061.
A349797 = non-weakly alternating ordered prime factorizations.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    whkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}];
    Table[Length[Select[Permutations[primeMS[n]],(whkQ[#]||whkQ[-#])&&MatchQ[#,{_,x_,x_,_}]&]],{n,100}]