A332294 Number of unimodal permutations of a multiset whose multiplicities are the prime indices of n.
1, 1, 1, 2, 1, 3, 1, 4, 3, 4, 1, 6, 1, 5, 4, 8, 1, 9, 1, 8, 5, 6, 1, 12, 4, 7, 9, 10, 1, 12, 1, 16, 6, 8, 5, 18, 1, 9, 7, 16, 1, 15, 1, 12, 12, 10, 1, 24, 5, 16, 8, 14, 1, 27, 6, 20, 9, 11, 1, 24, 1, 12, 15, 32, 7, 18, 1, 16, 10, 20, 1, 36, 1, 13, 16, 18, 6
Offset: 1
Keywords
Examples
The a(12) = 6 permutations: {1,1,2,3} {1,1,3,2} {1,2,3,1} {1,3,2,1} {2,3,1,1} {3,2,1,1}
Links
- MathWorld, Unimodal Sequence
Crossrefs
Programs
-
Mathematica
nrmptn[n_]:=Join@@MapIndexed[Table[#2[[1]],{#1}]&,If[n==1,{},Flatten[Cases[FactorInteger[n]//Reverse,{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[nrmptn[n]],unimodQ]],{n,0,30}]
Comments