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.

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 4, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Dec 24 2021

Keywords

Comments

First differs from 2 * A326291 at a(90) = 4, A326291(90) = 3.
The first odd term is a(144) = 7, whose non-weakly alternating permutations are shown in the example below.
We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. Then a sequence is alternating in the sense of A025047 iff it is a weakly alternating anti-run.
For n > 1, the multiset of prime factors of n is row n of A027746. The prime indices A112798 can also be used.

Examples

			The following are the weakly alternating permutations for selected n.
n = 30    60     72      120     144      180
   ---------------------------------------------
    235   2235   22332   22235   222332   22353
    532   2352   23223   22352   223223   23235
          2532   23322   22532   223322   23325
          3225   32232   23225   232232   23523
          5223           23522   233222   23532
          5322           25223   322223   25323
                         25322   322322   32235
                         32252            32253
                         52232            32352
                         53222            32532
                                          33225
                                          35223
                                          35322
                                          52233
                                          52332
                                          53223
                                          53232
		

Crossrefs

Counting all permutations of prime factors gives A008480.
Compositions not of this type are counted by A349052/A129852/A129853.
Compositions of this type are counted by A349053, ranked by A349057.
The complement is counted by A349056.
Partitions of this type are counted by A349061, complement A349060.
The version counting patterns is A350138, complement A349058.
The version counting ordered factorizations is A350139, complement A349059.
The strong case is counted by A350251, complement A345164.
Positions of nonzero terms are A350353.
A001250 counts alternating permutations, complement A348615.
A025047 = alternating compositions, ranked by A345167, complement A345192.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
A071321 gives the alternating sum of prime factors, reverse A071322.
A335452 counts anti-run permutations of prime factors, complement A336107.
A345165 counts partitions w/o an alternating permutation, ranked by A345171.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A348379 counts factorizations with an alternating permutation.

Programs

  • Mathematica
    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[Flatten[ConstantArray@@@ FactorInteger[n]]], !whkQ[#]&&!whkQ[-#]&]],{n,100}]

Formula

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