OFFSET
1,1
COMMENTS
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
A multiset is separable if it has a permutation that is an anti-run, meaning there are no adjacent equal parts. Alternatively, a multiset is separable if its greatest multiplicity is greater than the sum of the remaining multiplicities plus one.
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2). Alternating permutations of multisets are a generalization of alternating or up-down permutations of sets.
Note that 216 has separable prime factorization (2*2*2*3*3*3) with an alternating permutation, but the separable factorization (2*3*3*3*4) is has no alternating permutation. See also A345173.
EXAMPLE
The terms and their prime factorizations begin:
216 = 2*2*2*3*3*3
270 = 2*3*3*3*5
324 = 2*2*3*3*3*3
378 = 2*3*3*3*7
432 = 2*2*2*2*3*3*3
486 = 2*3*3*3*3*3
540 = 2*2*3*3*3*5
594 = 2*3*3*3*11
640 = 2*2*2*2*2*2*2*5
648 = 2*2*2*3*3*3*3
702 = 2*3*3*3*13
756 = 2*2*3*3*3*7
768 = 2*2*2*2*2*2*2*2*3
810 = 2*3*3*3*3*5
864 = 2*2*2*2*2*3*3*3
MATHEMATICA
facs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[facs[n/d], Min@@#>=d&]], {d, Rest[Divisors[n]]}]];
sepQ[m_]:=Select[Permutations[m], !MatchQ[#, {___, x_, x_, ___}]&]!={};
wigQ[y_]:=Or[Length[y]==0, Length[Split[y]]==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
Select[Range[1000], Function[n, Select[facs[n], sepQ[#]&&Select[Permutations[#], wigQ]=={}&]!={}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 30 2021
STATUS
approved