A373957 Greatest number of runs in a permutation of the prime factors of n.
0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 2, 1, 1, 3, 1, 3, 2, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1, 1, 2, 2, 2, 4, 1, 2, 2, 3, 1, 3, 1, 3, 3, 2, 1, 3, 1, 3, 2, 3, 1, 3, 2, 3, 2, 2, 1, 4, 1, 2, 3, 1, 2, 3, 1, 3, 2, 3, 1, 5, 1, 2, 3, 3, 2, 3, 1, 3, 1, 2, 1, 4, 2, 2, 2
Offset: 1
Keywords
Examples
The prime factors of 24 are {2,2,2,3}, with permutations (2,2,2,3), (2,2,3,2), (2,3,2,2), (3,2,2,2), with runs: ((2,2,2),(3)) ((2,2),(3),(2)) ((2),(3),(2,2)) ((3),(2,2,2)) with lengths (2,3,3,2), with maximum a(24) = 3.
Crossrefs
The minimum instead of maximum is A001221.
Positions of 2 are A006881.
Positions of first appearances appear to be A026549.
Positions of 1 are A246655.
This is the last position of a positive term in row n of A374252.
A008480 counts permutations of prime factors.
A333755 counts compositions by number of runs.
Programs
-
Mathematica
prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]]; Table[Max@@Table[Length[Split[y]],{y,Permutations[prifacs[n]]}],{n,100}]
Comments