Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #33 Oct 22 2023 00:36:48
%S 4,16,32,60,84,132,164,224,276,348,396,508,564,660,756,880,952,1108,
%T 1188,1356,1484,1628,1724,1964,2088,2256,2416,2640,2760,3048,3176,
%U 3428,3620,3836,4028,4392,4544,4784,5008,5368,5536,5920,6096,6432,6744,7032,7224,7720
%N Four times the sum of all divisors of all positive integers <= n.
%C Also number of "ON" cells at n-th stage in a structure which looks like a simple 2-dimensional cellular automaton (see example). The structure is formed by the reflection on the four quadrants from the diagram of the symmetry of sigma in the first quadrant after n-th stage, hence the area in each quadrant equals the area of each wedge and equals A024916(n); the sum of all divisors of all positive integers <= n. For more information about the diagram see A237593 and A237270.
%H Indranil Ghosh, <a href="/A243980/b243980.txt">Table of n, a(n) for n = 1..7342</a>
%F a(n) = A016742(n) - 4*A004125(n) = 4*A024916(n).
%F a(n) = 2*(A006218(n) + A222548(n)) = 2*A327329(n). - _Omar E. Pol_, Sep 25 2019
%e Illustration of the structure after 16 stages (contains 880 ON cells):
%e . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
%e . | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
%e . | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
%e . _ _| | _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |_ _
%e . _| _ _| |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |_ _ |_
%e . _| _| _| | _ _ _ _ _ _ _ _ _ _ _ _ | |_ |_ |_
%e . | _| |_ _| |_ _ _ _ _ _ _ _ _ _ _ _| |_ _| |_ |
%e . _ _ _| | _ _| | _ _ _ _ _ _ _ _ _ _ | |_ _ | |_ _ _
%e . | _ _ _|_| | _| |_ _ _ _ _ _ _ _ _ _| |_ | |_|_ _ _ |
%e . | | | _ _ _| _|_ _| _ _ _ _ _ _ _ _ |_ _|_ |_ _ _ | | |
%e . | | | | | _ _ _| | _| |_ _ _ _ _ _ _ _| |_ | |_ _ _ | | | | |
%e . | | | | | | | _ _|_| _| _ _ _ _ _ _ |_ |_|_ _ | | | | | | |
%e . | | | | | | | | | _ _| |_ _ _ _ _ _| |_ _ | | | | | | | | |
%e . | | | | | | | | | | | _ _| _ _ _ _ |_ _ | | | | | | | | | | |
%e . | | | | | | | | | | | | | _|_ _ _ _|_ | | | | | | | | | | | | |
%e . | | | | | | | | | | | | | | | _ _ | | | | | | | | | | | | | | |
%e . | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
%e . | | | | | | | | | | | | | | | |_ _| | | | | | | | | | | | | | | |
%e . | | | | | | | | | | | | | |_|_ _ _ _|_| | | | | | | | | | | | | |
%e . | | | | | | | | | | | |_|_ |_ _ _ _| _|_| | | | | | | | | | | |
%e . | | | | | | | | | |_|_ |_ _ _ _ _ _| _|_| | | | | | | | | |
%e . | | | | | | | |_|_ _ |_ |_ _ _ _ _ _| _| _ _|_| | | | | | | |
%e . | | | | | |_|_ _ | |_ |_ _ _ _ _ _ _ _| _| | _ _|_| | | | | |
%e . | | | |_|_ _ |_|_ _| |_ _ _ _ _ _ _ _| |_ _|_| _ _|_| | | |
%e . | |_|_ _ _ | |_ |_ _ _ _ _ _ _ _ _ _| _| | _ _ _|_| |
%e . |_ _ _ | |_|_ | |_ _ _ _ _ _ _ _ _ _| | _|_| | _ _ _|
%e . | |_ |_ _ |_ _ _ _ _ _ _ _ _ _ _ _| _ _| _| |
%e . |_ |_ |_ | |_ _ _ _ _ _ _ _ _ _ _ _| | _| _| _|
%e . |_ |_ _| |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |_ _| _|
%e . |_ _ | |_ _ _ _ _ _ _ _ _ _ _ _ _ _| | _ _|
%e . | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
%e . | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
%e . |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
%e .
%t Accumulate[4*DivisorSigma[1,Range[50]]] (* _Harvey P. Dale_, May 13 2018 *)
%o (Python)
%o from math import isqrt
%o def A243980(n): return -(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 21 2023
%Y Partial sums of A239050.
%Y Partial sums give A244050.
%Y Cf. A000203, A000290, A004125, A016742, A024916, A175254, A196020, A235791, A236104, A237270, A237271, A237591, A237593, A239660, A239931-A239934.
%K nonn
%O 1,1
%A _Omar E. Pol_, Jun 18 2014