login
A374246
Number of prime factors of n counted with multiplicity (A001222) minus the greatest number of runs possible in a permutation of them (A373957).
7
0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 2, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0
OFFSET
1,8
COMMENTS
a(n) = 0 iff n has separable prime factors (A335433). A multiset is separable iff it has a permutation that is an anti-run (meaning there are no adjacent equal parts).
FORMULA
a(n) = A001222(n) - A373957(n).
EXAMPLE
The runs of the 4 permutations of the prime factors of 24 are:
((2,2,2),(3))
((2,2),(3),(2))
((2),(3),(2,2))
((3),(2,2,2))
The longest have length 3, so a(24) = 4 - 3 = 1.
MATHEMATICA
prifacs[n_]:=If[n==1, {}, Flatten[ConstantArray@@@FactorInteger[n]]];
Table[PrimeOmega[n]-Max@@Table[Length[Split[y]], {y, Permutations[prifacs[n]]}], {n, 100}]
CROSSREFS
Using the minimum instead of maximum number of runs gives A046660.
Positions of first appearances are A151821 (powers of 2 except 2 itself).
Positions of positive terms are A335448, complement A335433.
This is an opposite version of A373957.
The sister-sequence A374247 uses A001221 instead of A001222.
This is the number of zeros at the end of row n of A374252.
A001221 counts distinct prime factors, A001222 with multiplicity.
A008480 counts permutations of prime factors.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A304038 is run-compression of prime indices, row-sums A066328.
A374250 maximizes sum of run-compression, for indices A373956.
Sequence in context: A219481 A361430 A298826 * A074079 A037858 A037876
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 07 2024
STATUS
approved