A345164 Number of alternating permutations of the multiset of prime factors of n.
1, 1, 1, 0, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 2, 2, 1, 0, 0, 2, 0, 1, 1, 4, 1, 0, 2, 2, 2, 2, 1, 2, 2, 0, 1, 4, 1, 1, 1, 2, 1, 0, 0, 1, 2, 1, 1, 0, 2, 0, 2, 2, 1, 4, 1, 2, 1, 0, 2, 4, 1, 1, 2, 4, 1, 1, 1, 2, 1, 1, 2, 4, 1, 0, 0, 2, 1, 4, 2, 2, 2
Offset: 1
Keywords
Examples
The a(n) alternating permutations of prime indices for n = 180, 210, 300, 420, 900: (12132) (1324) (13132) (12143) (121323) (21213) (1423) (13231) (13142) (132312) (21312) (2143) (21313) (13241) (213132) (23121) (2314) (23131) (14132) (213231) (31212) (2413) (31213) (14231) (231213) (3142) (31312) (21314) (231312) (3241) (21413) (312132) (3412) (23141) (323121) (4132) (24131) (4231) (31214) (31412) (34121) (41213) (41312)
Crossrefs
Counting all permutations gives A008480.
Dominated by A335452 (number of separations of prime factors).
Including twins (x,x) gives A344606.
Positions of nonzero terms are A345172.
A000041 counts integer partitions.
A001250 counts alternating permutations.
A003242 counts anti-run compositions.
A344604 counts alternating compositions with twins.
A345170 counts partitions with a alternating permutation.
Programs
-
Mathematica
wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1]; Table[Length[Select[Permutations[Flatten[ConstantArray@@@FactorInteger[n]]],wigQ]],{n,30}]
Comments