login
A344606
Number of alternating permutations of the prime factors of n, counting multiplicity, including twins (x,x).
57
1, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 2, 2, 1, 0, 1, 2, 0, 1, 1, 4, 1, 0, 2, 2, 2, 2, 1, 2, 2, 0, 1, 4, 1, 1, 1, 2, 1, 0, 1, 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,6
COMMENTS
Differs from A335448 in having a(x^2) = 0 and a(270) = 0.
These are permutations of the prime factors of n, counting multiplicity, with no adjacent triples (..., x, y, z, ...) where x <= y <= z or x >= y >= z.
The version without twins (x,x) is A345164, which is identical to this sequence except when n is the square of a prime.
EXAMPLE
The permutations for n = 2, 6, 30, 180, 210, 300, 420, 720, 840:
2 23 253 23253 2537 25253 23275 2323252 232527
32 325 32325 2735 25352 25273 2325232 232725
352 32523 3275 32525 25372 2523232 252327
523 35232 3527 35252 27253 252723
52323 3725 52325 27352 272325
5273 52523 32527 272523
5372 32725 325272
5723 35272 327252
7253 37252 523272
7352 52327 527232
52723 723252
57232 725232
72325
72523
For example, there are no alternating permutations of the prime factors of 270 because the only anti-runs are {3,2,3,5,3} and {3,5,3,2,3}, neither of which is alternating, so a(270) = 0.
MATHEMATICA
Table[Length[Select[Permutations[Flatten[ConstantArray@@@FactorInteger[n]]], !MatchQ[#, {___, x_, y_, z_, ___}/; x<=y<=z||x>=y>=z]&]], {n, 100}]
CROSSREFS
The version for permutations is A001250.
The extension to anti-run permutations is A335452.
The version for compositions is A344604.
The version for patterns is A344605.
Positions of zeros are A344653 (counted by A344654).
Not including twins (x,x) gives A345164.
A008480 counts permutations of prime indices (strict: A335489, rank: A333221).
A056239 adds up prime indices, row sums of A112798.
A071321 and A071322 are signed sums of prime factors.
A316523 is a signed sum of prime multiplicities.
A316524 and A344616 are signed sums of prime indices.
A325534 counts separable partitions (ranked by A335433).
A325535 counts inseparable partitions (ranked by A335448).
A344740 counts partitions with an alternating permutation or twin (x,x).
Sequence in context: A194289 A237194 A143519 * A341592 A348952 A307778
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 28 2021
STATUS
approved