A294016 a(n) = sum of all divisors of all positive integers <= n, minus the sum of remainders of n mod k, for k = 1, 2, 3, ..., n.
1, 4, 7, 14, 17, 30, 33, 48, 57, 74, 77, 110, 113, 134, 153, 184, 187, 230, 233, 278, 301, 330, 333, 406, 419, 452, 479, 536, 539, 624, 627, 690, 721, 762, 789, 900, 903, 948, 983, 1084, 1087, 1196, 1199, 1280, 1347, 1400, 1403, 1556, 1573, 1660, 1703, 1796, 1799, 1932, 1967, 2096, 2143, 2208, 2211, 2428, 2431, 2500
Offset: 1
Keywords
Examples
Illustration of initial terms: . . _ 1 . |_|_ _ 4 . | | . |_ _|_ _ 7 . | |_ . |_ | . |_ _|_ _ _ 14 . | |_ . | | . |_ | . |_ _ _|_ _ _ . | | 17 . | |_ _ . |_ _ | . | | . |_ _ _|_ _ _ _ . | |_ 30 . | |_ . | | . |_ | . |_ | . |_ _ _ _|_ _ _ _ . | | . | |_ 33 . | |_ _ . |_ _ | . |_ | . | | . |_ _ _ _| .
Crossrefs
Programs
-
Maple
A294016 := proc(n) A024916(n)-A004125(n) ; end proc: seq(A294016(n),n=1..80) ; # R. J. Mathar, Nov 07 2017
-
Mathematica
Accumulate[Table[2*(DivisorSigma[1, n] - n) + 1, {n, 1, 100}]] (* Amiram Eldar, Mar 30 2024 *)
-
Python
from math import isqrt def A294016(n): return -(s:=isqrt(n))**2*(s+1)+sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))-n**2 # Chai Wah Wu, Oct 22 2023
Formula
From Omar E. Pol, Nov 05 2017: (Start)
a(n) = (Pi^2/6 - 1) * n^2 + O(n*log(n)). - Amiram Eldar, Mar 30 2024
Comments