%I #43 Jul 19 2024 14:37:23
%S 1,4,7,14,17,30,33,48,57,74,77,110,113,134,153,184,187,230,233,278,
%T 301,330,333,406,419,452,479,536,539,624,627,690,721,762,789,900,903,
%U 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
%N 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.
%C a(n) is also the area (also the number of cells) of the n-th polygon formed by the Dyck path described in A237593 and its mirror, as shown below in the example.
%C a(n) is also the volume (and the number of cubes) in the n-th level (starting from the top) of the pyramid described in A294017.
%F a(n) = A024916(n) - A004125(n).
%F a(n) = A000290(n) - A067436(n).
%F From _Omar E. Pol_, Nov 05 2017: (Start)
%F a(n) = A000203(n) + A024816(n) + A153485(n) - A004125(n).
%F a(n) = A000217(n) + A153485(n) - A004125(n).
%F a(n) = A000203(n) + A153485(n) + A244048(n). (End)
%F a(n) = (Pi^2/6 - 1) * n^2 + O(n*log(n)). - _Amiram Eldar_, Mar 30 2024
%e Illustration of initial terms:
%e .
%e . _ 1
%e . |_|_ _ 4
%e . | |
%e . |_ _|_ _ 7
%e . | |_
%e . |_ |
%e . |_ _|_ _ _ 14
%e . | |_
%e . | |
%e . |_ |
%e . |_ _ _|_ _ _
%e . | | 17
%e . | |_ _
%e . |_ _ |
%e . | |
%e . |_ _ _|_ _ _ _
%e . | |_ 30
%e . | |_
%e . | |
%e . |_ |
%e . |_ |
%e . |_ _ _ _|_ _ _ _
%e . | |
%e . | |_ 33
%e . | |_ _
%e . |_ _ |
%e . |_ |
%e . | |
%e . |_ _ _ _|
%e .
%p A294016 := proc(n)
%p A024916(n)-A004125(n) ;
%p end proc:
%p seq(A294016(n),n=1..80) ; # _R. J. Mathar_, Nov 07 2017
%t Accumulate[Table[2*(DivisorSigma[1, n] - n) + 1, {n, 1, 100}]] (* _Amiram Eldar_, Mar 30 2024 *)
%o (Python)
%o from math import isqrt
%o 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
%Y Partial sums of A294015.
%Y Partial sums gives A294017.
%Y Cf. A000203, A000217, A000290, A013661, A004125, A024816, A024916, A067436, A153485, A196020, A235791, A236104, A237591, A237593, A244048, A245092.
%K nonn
%O 1,2
%A _Omar E. Pol_, Oct 22 2017
|