A256533 Product of n and the sum of all divisors of all positive integers <= n.
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
Keywords
Examples
For n = 3; a(3) = 3 * 8 = 19 + 5 = 24.
Links
- Indranil Ghosh, Table of n, a(n) for n = 1..10000
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
Comments