OFFSET
1,36
COMMENTS
EXAMPLE
The runs of the 6 permutations of the prime factors of 36 are:
((2,2),(3,3))
((2),(3),(2),(3))
((2),(3,3),(2))
((3),(2,2),(3))
((3),(2),(3),(2))
((3,3),(2,2))
The longest length is 4, so a(36) = 4 - 2 = 2.
MATHEMATICA
prifacs[n_]:=If[n==1, {}, Flatten[ConstantArray@@@FactorInteger[n]]];
Table[Max@@Table[Length[Split[y]], {y, Permutations[prifacs[n]]}]-PrimeNu[n], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 07 2024
STATUS
approved