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.

A256533 Product of n and the sum of all divisors of all positive integers <= n.

Original entry on oeis.org

1, 8, 24, 60, 105, 198, 287, 448, 621, 870, 1089, 1524, 1833, 2310, 2835, 3520, 4046, 4986, 5643, 6780, 7791, 8954, 9913, 11784, 13050, 14664, 16308, 18480, 20010, 22860, 24614, 27424, 29865, 32606, 35245, 39528, 42032, 45448, 48828, 53680, 56744, 62160, 65532, 70752, 75870, 80868, 84882, 92640, 97363, 104000
Offset: 1

Views

Author

Omar E. Pol, May 02 2015

Keywords

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.

Examples

			For n = 3; a(3) = 3 * 8 = 19 + 5 = 24.
		

Crossrefs

Programs

  • 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 *)
  • PARI
    a(n) = n*sum(k=1, n, n\k*k); \\ Michel Marcus, Apr 29 2020
  • 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
    

Formula

a(n) = n*A024916(n).
a(n) = n^3 - A256532(n).
a(n) = A143128(n) + A175254(n-1), n > 1.
a(n) = A332264(n) + A175254(n). - Omar E. Pol, Apr 29 2020