|
|
A349056
|
|
Number of weakly alternating permutations of the multiset of prime factors of n.
|
|
19
|
|
|
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 2, 1, 1, 3, 1, 3, 2, 2, 1, 4, 1, 2, 1, 3, 1, 4, 1, 1, 2, 2, 2, 4, 1, 2, 2, 4, 1, 4, 1, 3, 3, 2, 1, 5, 1, 3, 2, 3, 1, 4, 2, 4, 2, 2, 1, 6, 1, 2, 3, 1, 2, 4, 1, 3, 2, 4, 1, 6, 1, 2, 3, 3, 2, 4, 1, 5, 1, 2, 1, 6, 2, 2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
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.
A prime index of n is a number m such that prime(m) divides n. For n > 1, the multiset of prime factors of n is row n of A027746. The prime indices A112798 can also be used.
|
|
LINKS
|
|
|
EXAMPLE
|
The following are the weakly alternating permutations for selected n:
n = 2 6 12 24 48 60 90 120 180
----------------------------------------------------------
2 23 223 2223 22223 2253 2335 22253 22335
32 232 2232 22232 2325 2533 22325 22533
322 2322 22322 2523 3253 22523 23253
3222 23222 3252 3325 23252 23352
32222 3522 3352 25232 25233
5232 3523 32225 25332
5233 32522 32325
5332 35222 32523
52223 33252
52322 33522
35232
52323
53322
|
|
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}];
Table[Length[Select[Permutations[primeMS[n]], whkQ[#]||whkQ[-#]&]], {n, 100}]
|
|
CROSSREFS
|
Counting all permutations of prime factors gives A008480.
The variation counting anti-run permutations is A335452.
Compositions not of this type are counted by A349053, ranked by A349057.
The complement is counted by A349797.
The non-alternating case is A349798.
A003242 counts Carlitz (anti-run) compositions.
A345165 counts partitions w/o an alternating permutation, ranked by A345171.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A348379 counts factorizations with an alternating permutation.
A349800 counts weakly but not strongly alternating compositions.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|