A374246 Number of prime factors of n counted with multiplicity (A001222) minus the greatest number of runs possible in a permutation of them (A373957).
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
Keywords
Examples
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.
Crossrefs
Programs
-
Mathematica
prifacs[n_]:=If[n==1,{}, Flatten[ConstantArray@@@FactorInteger[n]]]; Table[PrimeOmega[n]-Max@@Table[Length[Split[y]], {y,Permutations[prifacs[n]]}],{n,100}]
Comments