OFFSET
1,1
COMMENTS
a(n) is also the volume of a special stepped pyramid with n levels related to the symmetric representation of sigma. Note that starting at the top of the pyramid, the total area of the horizontal regions at the n-th level is equal to A239050(n), and the total area of the vertical regions at the n-th level is equal to 8*n.
From Omar E. Pol, Sep 19 2015: (Start)
Also, consider that the area of the central square in the top of the pyramid is equal to 1, so the total area of the horizontal regions at the n-th level starting from the top is equal to sigma(n) = A000203(n), and the total area of the vertical regions at the n-th level is equal to 2*n.
Also note that this stepped pyramid can be constructed with four copies of the stepped pyramid described in A245092 back-to-back (one copy in every quadrant). (End)
From Omar E. Pol, Jan 20 2021: (Start)
(End)
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..10000 (first 7342 terms from Robert Price)
Omar E. Pol, Illustration of a(11) = 1736, Perspective view of the stepped pyramid with 11 levels which contains 1736 unit cubes.
FORMULA
a(n) = 4*A175254(n).
EXAMPLE
From Omar E. Pol, Aug 29 2015: (Start)
Illustration of the top view of the stepped pyramid with 16 levels. The pyramid is formed of 5104 unit cubes:
. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
. | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
. | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
. _ _| | _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |_ _
. _| _ _| |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |_ _ |_
. _| _| _| | _ _ _ _ _ _ _ _ _ _ _ _ | |_ |_ |_
. | _| |_ _| |_ _ _ _ _ _ _ _ _ _ _ _| |_ _| |_ |
. _ _ _| | _ _| | _ _ _ _ _ _ _ _ _ _ | |_ _ | |_ _ _
. | _ _ _|_| | _| |_ _ _ _ _ _ _ _ _ _| |_ | |_|_ _ _ |
. | | | _ _ _| _|_ _| _ _ _ _ _ _ _ _ |_ _|_ |_ _ _ | | |
. | | | | | _ _ _| | _| |_ _ _ _ _ _ _ _| |_ | |_ _ _ | | | | |
. | | | | | | | _ _|_| _| _ _ _ _ _ _ |_ |_|_ _ | | | | | | |
. | | | | | | | | | _ _| |_ _ _ _ _ _| |_ _ | | | | | | | | |
. | | | | | | | | | | | _ _| _ _ _ _ |_ _ | | | | | | | | | | |
. | | | | | | | | | | | | | _|_ _ _ _|_ | | | | | | | | | | | | |
. | | | | | | | | | | | | | | | _ _ | | | | | | | | | | | | | | |
. | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
. | | | | | | | | | | | | | | | |_ _| | | | | | | | | | | | | | | |
. | | | | | | | | | | | | | |_|_ _ _ _|_| | | | | | | | | | | | | |
. | | | | | | | | | | | |_|_ |_ _ _ _| _|_| | | | | | | | | | | |
. | | | | | | | | | |_|_ |_ _ _ _ _ _| _|_| | | | | | | | | |
. | | | | | | | |_|_ _ |_ |_ _ _ _ _ _| _| _ _|_| | | | | | | |
. | | | | | |_|_ _ | |_ |_ _ _ _ _ _ _ _| _| | _ _|_| | | | | |
. | | | |_|_ _ |_|_ _| |_ _ _ _ _ _ _ _| |_ _|_| _ _|_| | | |
. | |_|_ _ _ | |_ |_ _ _ _ _ _ _ _ _ _| _| | _ _ _|_| |
. |_ _ _ | |_|_ | |_ _ _ _ _ _ _ _ _ _| | _|_| | _ _ _|
. | |_ |_ _ |_ _ _ _ _ _ _ _ _ _ _ _| _ _| _| |
. |_ |_ |_ | |_ _ _ _ _ _ _ _ _ _ _ _| | _| _| _|
. |_ |_ _| |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |_ _| _|
. |_ _ | |_ _ _ _ _ _ _ _ _ _ _ _ _ _| | _ _|
. | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
. | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
. |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
.
Note that the above diagram contains a hidden pattern, simpler, which emerges from the front view of every corner of the stepped pyramid.
(End)
MATHEMATICA
a[n_] := 4 Sum[(n - k + 1) DivisorSigma[1, k], {k, n}]; Array[a, 40] (* Robert G. Wilson v, Aug 06 2018 *)
Nest[Accumulate, 4*DivisorSigma[1, Range[50]], 2] (* Harvey P. Dale, Sep 07 2022 *)
PROG
(PARI) a(n) = 4*sum(k=1, n, sigma(k)*(n-k+1)); \\ Michel Marcus, Aug 07 2018
(Magma) [4*(&+[(n-k+1)*DivisorSigma(1, k): k in [1..n]]): n in [1..40]]; // G. C. Greubel, Apr 07 2019
(Sage) [4*sum(sigma(k)*(n-k+1) for k in (1..n)) for n in (1..40)] # G. C. Greubel, Apr 07 2019
(Python)
from math import isqrt
def A244050(n): return (((s:=isqrt(n))**2*(s+1)*((s+1)*((s<<1)+1)-6*(n+1))>>1) + sum((q:=n//k)*(-k*(q+1)*(3*k+(q<<1)+1)+3*(n+1)*((k<<1)+q+1)) for k in range(1, s+1))<<1)//3 # Chai Wah Wu, Oct 22 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, Jun 18 2014
STATUS
approved