This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A163180 #11 Oct 23 2023 01:59:38 %S A163180 1,2,3,4,6,7,10,12,15,17,24,23,30,35,40,41,53,53,66,67,74,81,100,93, %T A163180 106,116,129,130,153,146,169,173,188,201,222,207,235,252,273,266,299, %U A163180 292,327,334,345,362,405,384,417,426,453,460,507,500,533,528,557,582,637,598,647 %N A163180 a(n) = tau(n) + Sum_{k=1..n} (n mod k). %C A163180 Number of divisors of n plus the sum of all the remainders modulo the numbers below n. %F A163180 a(n) = A000005(n) + A004125(n). %e A163180 a(1) = 1 + 0 = 1; %e A163180 a(2) = 2 + 0 = 2; %e A163180 a(3) = 2 + 1 = 3; %e A163180 a(4) = 3 + 1 = 4; %e A163180 a(5) = 2 + 4 = 6. %p A163180 A004125 := proc(n) add( modp(n,k),k=2..n) ; end: A163180 := proc(n) numtheory[tau](n)+A004125(n) ; end: seq(A163180(n),n=1..80) ; # _R. J. Mathar_, Jul 27 2009 %t A163180 Table[DivisorSigma[0,n]+Sum[Mod[n,k],{k,n}],{n,70}] (* _Harvey P. Dale_, Feb 11 2015 *) %o A163180 (Python) %o A163180 from math import isqrt %o A163180 from sympy import divisor_count %o A163180 def A163180(n): return divisor_count(n)+n**2+((s:=isqrt(n))**2*(s+1)-sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))>>1) # _Chai Wah Wu_, Oct 22 2023 %Y A163180 Cf. A000005, A004125. %K A163180 nonn %O A163180 1,2 %A A163180 _Juri-Stepan Gerasimov_, Jul 22 2009 %E A163180 169 inserted by _R. J. Mathar_, Jul 27 2009