OFFSET
1,30
COMMENTS
The first odd term is a(144) = 7, whose non-weakly alternating permutations are shown in the example below.
We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. Then a sequence is alternating in the sense of A025047 iff it is a weakly alternating anti-run.
EXAMPLE
The following are the weakly alternating permutations for selected n.
n = 30 60 72 120 144 180
---------------------------------------------
235 2235 22332 22235 222332 22353
532 2352 23223 22352 223223 23235
2532 23322 22532 223322 23325
3225 32232 23225 232232 23523
5223 23522 233222 23532
5322 25223 322223 25323
25322 322322 32235
32252 32253
52232 32352
53222 32532
33225
35223
35322
52233
52332
53223
53232
MATHEMATICA
whkQ[y_]:=And@@Table[If[EvenQ[m], y[[m]]<=y[[m+1]], y[[m]]>=y[[m+1]]], {m, 1, Length[y]-1}];
Table[Length[Select[Permutations[Flatten[ConstantArray@@@ FactorInteger[n]]], !whkQ[#]&&!whkQ[-#]&]], {n, 100}]
CROSSREFS
Counting all permutations of prime factors gives A008480.
The complement is counted by A349056.
Positions of nonzero terms are A350353.
A348379 counts factorizations with an alternating permutation.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 24 2021
STATUS
approved