OFFSET
1,6
COMMENTS
An ordered factorization of n is a finite sequence of positive integers > 1 with product n.
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).
LINKS
EXAMPLE
The alternating ordered factorizations of n = 1, 6, 12, 16, 24, 30, 32, 36:
() 6 12 16 24 30 32 36
2*3 2*6 2*8 3*8 5*6 4*8 4*9
3*2 3*4 8*2 4*6 6*5 8*4 9*4
4*3 2*4*2 6*4 10*3 16*2 12*3
6*2 8*3 15*2 2*16 18*2
2*3*2 12*2 2*15 2*8*2 2*18
2*12 3*10 4*2*4 3*12
2*4*3 2*5*3 2*6*3
2*6*2 3*2*5 2*9*2
3*2*4 3*5*2 3*2*6
3*4*2 5*2*3 3*4*3
4*2*3 3*6*2
6*2*3
2*3*2*3
3*2*3*2
MATHEMATICA
ordfacs[n_]:=If[n<=1, {{}}, Join@@Table[Prepend[#, d]&/@ordfacs[n/d], {d, Rest[Divisors[n]]}]];
wigQ[y_]:=Or[Length[y]==0, Length[Split[y]] == Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
Table[Length[Select[ordfacs[n], wigQ]], {n, 100}]
CROSSREFS
The complement is counted by A348613.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.
A347463 counts ordered factorizations with integer alternating product.
A348379 counts factorizations w/ an alternating permutation.
A348380 counts factorizations w/o an alternating permutation.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 05 2021
STATUS
approved