login
A374255
Sum of prime factors of n (with multiplicity) minus the greatest possible sum of run-compression of a permutation of the prime factors of n.
1
0, 0, 0, 2, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 6, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 7, 0, 0, 0, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0
OFFSET
1,4
COMMENTS
Contains no ones.
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).
FORMULA
a(n) = A001414(n) - A374250(n).
EXAMPLE
The prime factors of 96 are {2,2,2,2,2,3}, with sum 13, and we have permutations such as (2,2,2,2,3,2), with run-compression (2,3,2), with sum 7, so a(96) = 13 - 7 = 6.
MATHEMATICA
prifacs[n_]:=If[n==1, {}, Flatten[ConstantArray@@@FactorInteger[n]]];
Table[Total[prifacs[n]]-Max@@(Total[First/@Split[#]]& /@ Permutations[prifacs[n]]), {n, 100}]
CROSSREFS
Positions of first appearances are A280286.
For least instead of greatest sum of run-compression we have A280292.
Positions of zeros are A335433 (separable).
Positions of positive terms are A335448 (inseparable).
For prime indices instead of factors we have A374248.
This is an opposite version of A374250, for prime indices A373956.
A001221 counts distinct prime factors, A001222 with multiplicity.
A003242 counts run-compressed compositions, i.e., anti-runs.
A007947 (squarefree kernel) represents run-compression of multisets.
A008480 counts permutations of prime factors.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A056239 adds up prime indices, row sums of A112798.
A116861 counts partitions by sum of run-compression.
A304038 is run-compression of prime indices, row-sums A066328.
A373949 counts compositions by sum of run-compression, opposite A373951.
A373957 gives greatest number of runs in a permutation of prime factors.
A374251 run-compresses standard compositions, sum A373953, rank A373948.
A374252 counts permutations of prime factors by number of runs.

Sequence in context: A011991 A234931 A129183 * A280292 A181566 A348513
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 10 2024
STATUS
approved