Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A374247
The greatest number of runs possible in a permutation of the prime factors of n (A373957) minus the number of distinct such factors (A001221).
7
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0
OFFSET
1,36
COMMENTS
If n has separable prime factors (A335433), then a(n) = A001222(n) - A001221(n) = A046660(n). A multiset is separable iff it has an anti-run permutation (meaning there are no adjacent equal parts).
FORMULA
a(n) = A373957(n) - A001221(n).
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
Positions of first appearances appear to be A026549.
Positions of nonzero terms are A126706, complement A303554.
This is an opposite version of A373957.
The sister-sequence A374246 uses A001222 instead of A001221.
This is the number of nonzero terms in row n of A374252.
A003242 counts run-compressed compositions, i.e., anti-runs.
A008480 counts permutations of prime factors, by number of runs A374252.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A304038 is run-compression of prime indices, row-sums A066328.
A333755 counts compositions by number of runs.
A335433 lists separable numbers, complement A335448.
A374250 maximizes sum of run-compression, for indices A373956.
Sequence in context: A328891 A101436 A366247 * A369165 A056170 A248395
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 07 2024
STATUS
approved