OFFSET
1,1
COMMENTS
A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), which gives a bijective correspondence between positive integers and integer partitions.
LINKS
MathWorld, Unimodal Sequence
EXAMPLE
The sequence of terms together with their prime indices begins:
36: {1,1,2,2}
50: {1,3,3}
70: {1,3,4}
72: {1,1,1,2,2}
98: {1,4,4}
100: {1,1,3,3}
108: {1,1,2,2,2}
140: {1,1,3,4}
144: {1,1,1,1,2,2}
154: {1,4,5}
180: {1,1,2,2,3}
182: {1,4,6}
196: {1,1,4,4}
200: {1,1,1,3,3}
216: {1,1,1,2,2,2}
225: {2,2,3,3}
242: {1,5,5}
250: {1,3,3,3}
252: {1,1,2,2,4}
280: {1,1,1,3,4}
For example, the prime indices of 70 with 0 appended are (4,3,1,0), with differences (-1,-2,-1), which is not unimodal, so 70 belongs to the sequence.
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]]]];
Select[Range[1000], !unimodQ[Differences[Append[Reverse[primeMS[#]], 0]]]&]
CROSSREFS
The enumeration of these partitions by sum is A332284.
Not assuming the last part is zero gives A332725.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Non-unimodal normal sequences are A328509.
Partitions with non-unimodal run-lengths are A332281.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 21 2020
STATUS
approved