|
|
A135062
|
|
Define the sequence {b_n(m)} by b_n(0)=1; b_n(m) = A000005(b_n(m-1) + n), for all m >= 1. Then a(n) is the smallest positive integer such that b_n(m) = b_n(m + a(n)) for all m > some positive integer.
|
|
1
|
|
|
1, 1, 2, 1, 1, 2, 1, 3, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 1, 3, 1, 1, 1, 3, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 4, 1, 3, 1, 1, 1, 2, 2, 1, 4, 1, 1, 2, 3, 1, 1, 1, 3, 1, 1, 2, 3, 1, 2, 2, 5, 1, 1, 1, 4, 1, 2, 2, 2, 2, 1, 4, 3, 1, 1, 1, 1, 2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
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;
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|