OFFSET
1,12
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
Mathematics Stack Exchange, What is a sequence run? (answered 2011-12-01)
EXAMPLE
The prime indices of 630 are {1,2,2,3,4}, with multiplicities {1,2,1,1}, with runs {{1},{2},{1,1}}, so a(630) = 3.
MATHEMATICA
Table[Length[Split[Last/@If[n==1, {}, FactorInteger[n]]]], {n, 100}]
PROG
(PARI)
pis_to_runs(n) = { my(runs=List([]), f=factor(n)); for(i=1, #f~, while(f[i, 2], listput(runs, primepi(f[i, 1])); f[i, 2]--)); (runs); };
runlengths(lista) = if(!#lista, lista, if(1==#lista, List([1]), my(runs=List([]), rl=1); for(i=1, #lista, if((i < #lista) && (lista[i]==lista[i+1]), rl++, listput(runs, rl); rl=1)); (runs)));
A353745(n) = #runlengths(runlengths(pis_to_runs(n))); \\ Antti Karttunen, Jan 20 2025
KEYWORD
nonn,changed
AUTHOR
Gus Wiseman, May 20 2022
STATUS
approved