cp's OEIS Frontend

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.

A243980 Four times the sum of all divisors of all positive integers <= n.

Original entry on oeis.org

4, 16, 32, 60, 84, 132, 164, 224, 276, 348, 396, 508, 564, 660, 756, 880, 952, 1108, 1188, 1356, 1484, 1628, 1724, 1964, 2088, 2256, 2416, 2640, 2760, 3048, 3176, 3428, 3620, 3836, 4028, 4392, 4544, 4784, 5008, 5368, 5536, 5920, 6096, 6432, 6744, 7032, 7224, 7720
Offset: 1

Views

Author

Omar E. Pol, Jun 18 2014

Keywords

Comments

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.

Examples

			Illustration of the structure after 16 stages (contains 880 ON cells):
.                 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.                |  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |
.                | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
.             _ _| |  _ _ _ _ _ _ _ _ _ _ _ _ _ _  | |_ _
.           _|  _ _| |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |_ _  |_
.         _|  _|  _| |  _ _ _ _ _ _ _ _ _ _ _ _  | |_  |_  |_
.        |  _|   |_ _| |_ _ _ _ _ _ _ _ _ _ _ _| |_ _|   |_  |
.   _ _ _| |  _ _|     |  _ _ _ _ _ _ _ _ _ _  |     |_ _  | |_ _ _
.  |  _ _ _|_| |      _| |_ _ _ _ _ _ _ _ _ _| |_      | |_|_ _ _  |
.  | | |  _ _ _|    _|_ _|  _ _ _ _ _ _ _ _  |_ _|_    |_ _ _  | | |
.  | | | | |  _ _ _| |  _| |_ _ _ _ _ _ _ _| |_  | |_ _ _  | | | | |
.  | | | | | | |  _ _|_|  _|  _ _ _ _ _ _  |_  |_|_ _  | | | | | | |
.  | | | | | | | | |  _ _|   |_ _ _ _ _ _|   |_ _  | | | | | | | | |
.  | | | | | | | | | | |  _ _|  _ _ _ _  |_ _  | | | | | | | | | | |
.  | | | | | | | | | | | | |  _|_ _ _ _|_  | | | | | | | | | | | | |
.  | | | | | | | | | | | | | | |  _ _  | | | | | | | | | | | | | | |
.  | | | | | | | | | | | | | | | |   | | | | | | | | | | | | | | | |
.  | | | | | | | | | | | | | | | |_ _| | | | | | | | | | | | | | | |
.  | | | | | | | | | | | | | |_|_ _ _ _|_| | | | | | | | | | | | | |
.  | | | | | | | | | | | |_|_  |_ _ _ _|  _|_| | | | | | | | | | | |
.  | | | | | | | | | |_|_    |_ _ _ _ _ _|    _|_| | | | | | | | | |
.  | | | | | | | |_|_ _  |_  |_ _ _ _ _ _|  _|  _ _|_| | | | | | | |
.  | | | | | |_|_ _  | |_  |_ _ _ _ _ _ _ _|  _| |  _ _|_| | | | | |
.  | | | |_|_ _    |_|_ _| |_ _ _ _ _ _ _ _| |_ _|_|    _ _|_| | | |
.  | |_|_ _ _  |     |_  |_ _ _ _ _ _ _ _ _ _|  _|     |  _ _ _|_| |
.  |_ _ _  | |_|_      | |_ _ _ _ _ _ _ _ _ _| |      _|_| |  _ _ _|
.        | |_    |_ _  |_ _ _ _ _ _ _ _ _ _ _ _|  _ _|    _| |
.        |_  |_  |_  | |_ _ _ _ _ _ _ _ _ _ _ _| |  _|  _|  _|
.          |_  |_ _| |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |_ _|  _|
.            |_ _  | |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |  _ _|
.                | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
.                | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
.                |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[4*DivisorSigma[1,Range[50]]] (* Harvey P. Dale, May 13 2018 *)
  • Python
    from math import isqrt
    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

Formula

a(n) = A016742(n) - 4*A004125(n) = 4*A024916(n).
a(n) = 2*(A006218(n) + A222548(n)) = 2*A327329(n). - Omar E. Pol, Sep 25 2019