OFFSET
1,2
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..1000
EXAMPLE
{b_7(m)} is 0,2,3,4,2,3,4,..., with (2,3,4) repeating thereafter. So a(7) = 3, the length of the repeating subsequence (2,3,4).
MAPLE
b := proc(n, m) option remember; if m =0 then 0; else numtheory[tau]( procname(n, m-1)+n); end if; end proc:
A135063 := proc(n) bseq := [] ; for m from 0 do bs := b(n, m) ; if member(bs, bseq, 'w') then return 1+nops(bseq)-w ; else bseq := [op(bseq), bs] ; end if; end do: end proc: seq(A135063(n), n=1..120) ; # R. J. Mathar, Aug 09 2010
MATHEMATICA
b[n_, m_] := b[n, m] = If[m == 0, 0, DivisorSigma[0, b[n, m-1] + n]];
A135063[n_] := Module[{bseq = {}}, For[m = 0, True, m++, bs = b[n, m]; w = Position[bseq, bs]; If[w != {}, Return[1+Length[bseq]-w[[1, 1]]], AppendTo[bseq, bs]]]];
PROG
(PARI) a(n) = my(b, k, v=List([0])); 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
Terms beyond a(12) from R. J. Mathar, Aug 09 2010
STATUS
approved