OFFSET
1,2
COMMENTS
a(n) is also sum of the volumes (or the total number of unit cubes) from two complementary polycubes: the irregular staircase after n-th stage described in A244580, and the irregular stepped pyramid after (n-1)st stage described in A245092. Note that in both structures the horizontal area in the n-th level is also the symmetric representation of sigma(n). This comment is represented by the third formula.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
For n = 3; a(3) = 3 * 8 = 19 + 5 = 24.
MATHEMATICA
a[n_]:=n*Apply[Plus, Flatten[Divisors[Range[n]]]]; Array[a, 50] (* Ivan N. Ianakiev, May 03 2015 *)
nxt[{n_, sd_, a_}]:=Module[{k=(n+1)*(DivisorSigma[1, n+1]+sd)}, {n+1, sd+DivisorSigma[ 1, n+1], k}]; NestList[ nxt, {1, 1, 1}, 50][[;; , 3]] (* Harvey P. Dale, Jun 12 2023 *)
PROG
(Python)
def A256533(n):
s=0
for k in range(1, n+1):
s+=n%k
return (n**3)-(s*n) # Indranil Ghosh, Feb 13 2017
(Python)
from math import isqrt
def A256533(n): return n*(-(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 22 2023
(PARI) a(n) = n*sum(k=1, n, n\k*k); \\ Michel Marcus, Apr 29 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, May 02 2015
STATUS
approved