OFFSET
1,1
LINKS
David A. Corneth, Table of n, a(n) for n = 1..102
David A. Corneth, Upper bounds on some terms <= 10^13
EXAMPLE
a(1) = 2 because tau(2) = tau(3) = 2; a(1) = A005237(1).
a(2) = 10 because tau(10) + tau(11) = 4 + 2 = 6, the same as tau(12) = 6.
a(3) = 93 because tau(93) + tau(94) + tau(95) = 4 + 4 + 4 = 12, the same as tau(96) = 12.
MATHEMATICA
a[n_] := Module[{div = DivisorSigma[0, Range[n]], k = n + 1}, While[(d = DivisorSigma[0, k]) != Plus @@ div, div = Join[Drop[div, 1], {d}]; k++]; k - n]; Array[a, 20] (* Amiram Eldar, Nov 01 2021 *)
PROG
(PARI) a(n) = my(k=1); while (sum(i=k, k+n-1, numdiv(i)) != numdiv(k+n), k++); k; \\ Michel Marcus, Nov 01 2021
(PARI) a(n)=my(v=vector(n, k, numdiv(k)), s=vecsum(v), t, i=n); forfactored(k=n+1, 2^63-1, t=numdiv(k); if(s==t, return(k[1]-n)); if(i++>n, i=1); s+=t-v[i]; v[i]=t) \\ Charles R Greathouse IV, Nov 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Metin Sariyar, Nov 01 2021
EXTENSIONS
a(21)-a(26) from Michel Marcus, Nov 01 2021
a(27)-a(35) from Amiram Eldar, Nov 01 2021
STATUS
approved