A374250 Greatest sum of run-compression of a permutation of the prime factors of n.
0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 7, 13, 9, 8, 2, 17, 8, 19, 9, 10, 13, 23, 7, 5, 15, 3, 11, 29, 10, 31, 2, 14, 19, 12, 10, 37, 21, 16, 9, 41, 12, 43, 15, 11, 25, 47, 7, 7, 12, 20, 17, 53, 8, 16, 11, 22, 31, 59, 12, 61, 33, 13, 2, 18, 16, 67, 21, 26, 14, 71
Offset: 1
Keywords
Examples
The prime factors of 24 are {2,2,2,3}, with permutations such as (2,2,3,2) whose run-compression sums to 7, so a(24) = 7. The prime factors of 216 are {2,2,2,3,3,3}, with permutations such as (2,3,2,3,2,3) whose run-compression sums to 15, so a(216) = 15.
Crossrefs
Positions of 2 are A000079 (powers of two) except 1.
Positions of 3 are A000244 (powers of three) except 1.
For least instead of greatest sum of run-compression we have A008472.
For prime indices instead of factors we have A373956.
For number of runs instead of sum of run-compression we have A373957.
A003242 counts run-compressed compositions, i.e., anti-runs.
A007947 (squarefree kernel) represents run-compression of multisets.
A008480 counts permutations of prime factors (or prime indices).
A116861 counts partitions by sum of run-compression.
Programs
-
Mathematica
prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]]; Table[Max@@(Total[First/@Split[#]]& /@ Permutations[prifacs[n]]),{n,100}]
Comments