login
Number of prime factors of n counted with multiplicity (A001222) minus the greatest number of runs possible in a permutation of them (A373957).
7

%I #7 Jul 08 2024 16:41:41

%S 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,

%T 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,

%U 0,0,0,0,0,0,0,0,0,0,0,2,3,0,0,0,0,0,0

%N Number of prime factors of n counted with multiplicity (A001222) minus the greatest number of runs possible in a permutation of them (A373957).

%C 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).

%F a(n) = A001222(n) - A373957(n).

%e The runs of the 4 permutations of the prime factors of 24 are:

%e ((2,2,2),(3))

%e ((2,2),(3),(2))

%e ((2),(3),(2,2))

%e ((3),(2,2,2))

%e The longest have length 3, so a(24) = 4 - 3 = 1.

%t prifacs[n_]:=If[n==1,{}, Flatten[ConstantArray@@@FactorInteger[n]]];

%t Table[PrimeOmega[n]-Max@@Table[Length[Split[y]], {y,Permutations[prifacs[n]]}],{n,100}]

%Y Using the minimum instead of maximum number of runs gives A046660.

%Y Positions of first appearances are A151821 (powers of 2 except 2 itself).

%Y Positions of positive terms are A335448, complement A335433.

%Y This is an opposite version of A373957.

%Y The sister-sequence A374247 uses A001221 instead of A001222.

%Y This is the number of zeros at the end of row n of A374252.

%Y A001221 counts distinct prime factors, A001222 with multiplicity.

%Y A008480 counts permutations of prime factors.

%Y A027746 lists prime factors, row-sums A001414.

%Y A027748 is run-compression of prime factors, row-sums A008472.

%Y A304038 is run-compression of prime indices, row-sums A066328.

%Y A374250 maximizes sum of run-compression, for indices A373956.

%Y Cf. A003242, A007947, A026549, A056239, A124767, A246655, A316413, A333755.

%K nonn

%O 1,8

%A _Gus Wiseman_, Jul 07 2024