A332671 Number of non-unimodal permutations of the multiset of prime indices of n.
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
Keywords
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
Links
- MathWorld, Unimodal Sequence
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}]
Comments