%I #44 Aug 17 2024 15:09:52
%S 1,2,5,9,16,22,34,42,57,70,88,100,128,142,166,190,221,239,278,298,340,
%T 372,408,432,492,523,565,605,661,691,763,795,858,906,960,1008,1099,
%U 1137,1197,1253,1343,1385,1481,1525,1609,1687,1759,1807,1931,1988,2081,2153
%N a(n) = a(n-1) + A000203(n), a(0)=1.
%H Charles R Greathouse IV, <a href="/A160664/b160664.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n) = 1 + A024916(n). - _R. J. Mathar_, May 25 2009
%F a(n) = 9 + A092406(n) for n>3. - _Greg Dresden_, Feb 23 2020
%p ListTools:-PartialSums(map(numtheory:-sigma,[1,$1..100])); # _Robert Israel_, Dec 19 2016
%t lst = {1}; a = 1; Do[a = a + DivisorSigma[1, n]; AppendTo[lst, a], {n, 80}]; lst (* _Carl Najafi_, Aug 21 2011 *)
%t Transpose[NestList[{First[#]+1,Last[#]+DivisorSigma[1,First[#]+1]}&,{0,1},50]][[2]] (* _Harvey P. Dale_, May 05 2012 *)
%o (PARI) a(n)=1+sum(k=1,n,sigma(k)) \\ _Charles R Greathouse IV_, Aug 22 2011
%o (Python)
%o from math import isqrt
%o def A160664(n): return (-(s:=isqrt(n))**2*(s+1) + sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))>>1)+1 # _Chai Wah Wu_, Oct 22 2023
%Y Cf. A054519, A092406, A024916. - _Greg Dresden_, Feb 23 2020
%K nonn
%O 0,2
%A _Ctibor O. Zizka_, May 22 2009
%E More terms from _Carl Najafi_, Aug 21 2011