OFFSET
1,1
COMMENTS
We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either.
EXAMPLE
The terms together with a (generally not unique) non-weakly alternating permutation of each multiset of prime indices begin:
30 : (1,2,3) 100 : (1,3,3,1)
36 : (1,2,2,1) 102 : (1,2,7)
42 : (1,2,4) 105 : (2,3,4)
60 : (1,1,2,3) 108 : (1,2,2,1,2)
66 : (1,2,5) 110 : (1,3,5)
70 : (1,3,4) 114 : (1,2,8)
72 : (1,1,2,2,1) 120 : (1,1,1,2,3)
78 : (1,2,6) 126 : (1,2,4,2)
84 : (1,1,2,4) 130 : (1,3,6)
90 : (1,2,3,2) 132 : (1,1,2,5)
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
whkQ[y_]:=And@@Table[If[EvenQ[m], y[[m]]<=y[[m+1]], y[[m]]>=y[[m+1]]], {m, 1, Length[y]-1}];
Select[Range[100], Select[Permutations[primeMS[#]], !whkQ[#]&&!whkQ[-#]&]!={}&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 13 2022
STATUS
approved