OFFSET
1,1
EXAMPLE
Sequence {b_9(m)} is 1, 5, 7, 2, 11, 5, 7, 2, 11, ... (5, 7, 2, 11) repeats. So a(9) = 4, the length of the cycle in {b_9(m)}.
PROG
(PARI) a(n) = my(b=1, k, v=List([1])); until(k<#v, k=1; listput(v, b=vecmax(factor(b+n)[, 1])); until(v[k]==b||k==#v, k++)); #v-k; \\ Jinyuan Wang, Aug 22 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Nov 12 2007
EXTENSIONS
More terms from Jinyuan Wang, Aug 22 2021
STATUS
approved