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.
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
Keywords
Examples
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.
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.
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.
Programs
-
Mathematica
prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]]; Table[Total[prifacs[n]]-Max@@(Total[First/@Split[#]]& /@ Permutations[prifacs[n]]),{n,100}]
Comments