OFFSET
0,3
EXAMPLE
{b_8(m)} is 1, 3, 2, 4, 6, 4, 6, ..., with (4, 6) repeating thereafter. So a(8) = 2, the length of the repeating subsequence (4, 6).
MATHEMATICA
nmax = 100; mmax = 10; (* sequence shows zeroes if mmax insufficient *)
b[n_, m_] := b[n, m] = If[m == 0, 1, DivisorSigma[0, b[n, m-1] + n]];
perLen[lst_] := FindTransientRepeat[lst, 2] // Last // Length;
a[n_] := Table[b[n, m], {m, 0, mmax}] // perLen;
Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Feb 08 2024 *)
PROG
(PARI) a(n) = my(b=1, k, v=List([1])); until(k<#v, k=1; listput(v, b=numdiv(b+n)); until(v[k]==b||k==#v, k++)); #v-k; \\ Jinyuan Wang, Aug 22 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Nov 15 2007
EXTENSIONS
More terms from Jinyuan Wang, Aug 22 2021
STATUS
approved