OFFSET
1,2
COMMENTS
Does a(n)=sigma(n) only for n=1,2,3,4?
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
MATHEMATICA
nxt[{n_, a_}]:=Module[{s=DivisorSigma[1, n+1]}, {n+1, If[s>=a, s, a+s]}]; NestList[ nxt, {1, 1}, 60][[All, 2]] (* Harvey P. Dale, Aug 04 2022 *)
PROG
(PARI) { v=vector(60); v[1]=sigma(1); for (i=2, 60, if (sigma(i)<v[i-1], v[i]=v[i-1]+sigma(i), v[i]=sigma(i))); v }
(Python)
from math import isqrt
def A092406(n): return (-(s:=isqrt(n))**2*(s+1) + sum((q:=n//k)*((k<<1)+q+1) for k in range(1, s+1))>>1)-8 if n>3 else (1 if n<2 else n+1) # Chai Wah Wu, Oct 22 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Mar 22 2004
STATUS
approved