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.

A350251 Number of non-alternating permutations of the multiset of prime factors of n.

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

Views

Author

Gus Wiseman, Jan 08 2022

Keywords

Comments

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

Examples

			The a(n) permutations for selected n:
n = 4    12    24     48      60     72      90     96       120
   ----------------------------------------------------------------
    22   223   2223   22223   2235   22233   2335   222223   22235
         322   2232   22232   2253   22323   2353   222232   22253
               2322   22322   2352   22332   2533   222322   22325
               3222   23222   2532   23223   3235   223222   22352
                      32222   3225   23322   3325   232222   22523
                              3522   32223   3352   322222   22532
                              5223   32232   3532            23225
                              5322   32322   5233            23522
                                     33222   5323            25223
                                             5332            25322
                                                             32225
                                                             32252
                                                             32522
                                                             35222
                                                             52223
                                                             52232
                                                             52322
                                                             53222
		

Crossrefs

The non-anti-run case is A336107, complement A335452.
The complement is counted by A345164, with twins A344606.
Positions of nonzero terms are A345171, counted by A345165.
Positions of zeros are A345172, counted by A345170.
Compositions of this type are counted by A345192, ranked by A345168.
Ordered factorizations of this type counted by A348613, complement A348610.
Compositions weakly of this type are counted by A349053, ranked by A349057.
The weak version is A349797, complement A349056.
The case that is also weakly alternating is A349798, compositions A349800.
Patterns of this type are counted by A350252, complement A345194.
A001250 counts alternating permutations, complement A348615.
A003242 counts Carlitz (anti-run) compositions.
A008480 counts permutations of prime factors (ordered prime factorizations).
A025047/A025048/A025049 count alternating compositions, ranked by A345167.
A056239 adds up prime indices, row sums of A112798 (row lengths A001222).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344616 gives the alternating sum of prime indices, reverse A316524.
A349052/A129852/A129853 count weakly alternating compositions.

Programs

  • Mathematica
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]] ==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[Permutations[Flatten[ ConstantArray@@@FactorInteger[n]]],!wigQ[#]&]],{n,100}]

Formula

a(n) = A008480(n) - A345164(n).