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.

A332671 Number of non-unimodal permutations of the multiset of prime indices of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 6, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Feb 22 2020

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.

Examples

			The a(n) permutations for n = 18, 30, 36, 42, 50, 54, 60, 66, 70, 72:
  212  213  1212  214  313  2122  1213  215  314  11212
       312  2112  412       2212  1312  512  413  12112
            2121                  2113            12121
                                  2131            21112
                                  3112            21121
                                  3121            21211
		

Crossrefs

Dominated by A008480.
The complement is counted by A332288.
A more interesting version is A332672.
Unimodal compositions are A001523.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Non-unimodal normal sequences are A328509.
Heinz numbers of partitions with non-unimodal run-lengths are A332282.
Compositions whose negation is not unimodal are A332669.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
    Table[Length[Select[Permutations[primeMS[n]],!unimodQ[#]&]],{n,100}]

Formula

a(n) + A332288(n) = A008480(n).
a(A181821(n)) = A332672(n).