OFFSET
1,8
COMMENTS
We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, run-compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
EXAMPLE
The prime indices of 96 are {1,1,1,1,1,2}, with sum 7, and we have permutations such as (1,1,1,1,2,1), with run-compression (1,2,1), with sum 4, so a(96) = 7 - 4 = 3.
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Total[prix[n]]-Max@@(Total[First/@Split[#]]&/@Permutations[prix[n]]), {n, 100}]
CROSSREFS
Positions of zeros are A335433 (separable).
Positions of positive terms are A335448 (inseparable).
For prime factors instead of indices we have A374255.
A003242 counts run-compressed compositions, i.e., anti-runs.
A007947 (squarefree kernel) represents run-compression of multisets.
A008480 counts permutations of prime factors.
A116861 counts partitions by sum of run-compression.
A373957 gives greatest number of runs in a permutation of prime factors.
A374252 counts permutations of prime factors by number of runs.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 10 2024
STATUS
approved