A064945 a(n) = Sum_{i|n, j|n, j >= i} i.
1, 4, 5, 11, 7, 22, 9, 26, 18, 30, 13, 64, 15, 38, 38, 57, 19, 82, 21, 87, 48, 54, 25, 156, 38, 62, 58, 109, 31, 179, 33, 120, 68, 78, 68, 244, 39, 86, 78, 213, 43, 224, 45, 153, 143, 102, 49, 348, 66, 166, 98, 175, 55, 268, 96, 267, 108, 126, 61, 542, 63, 134, 181
Offset: 1
Examples
a(6) = dot_product(4,3,2,1)*(1,2,3,6) = 4*1+3*2+2*3+1*6 = 22.
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harry J. Smith)
Crossrefs
Programs
-
Haskell
a064945 = sum . zipWith (*) [1..] . reverse . a027750_row' -- Reinhard Zumkeller, Jul 14 2015
-
Maple
with(numtheory): seq(add((tau(n)-i+1)*sort(convert(divisors(n),'list'))[i],i=1..tau(n)), n=1..200);
-
Mathematica
A064945[n_] := #.Range[Length[#], 1, -1] & [Divisors[n]]; Array[A064945, 100] (* Paolo Xausa, Aug 07 2025 *)
-
PARI
a(n) = my(d=divisors(n), t=length(d)); sum(i=1, t, (t - i + 1)*d[i]); \\ Harry J. Smith, Oct 01 2009
-
PARI
a(n)=my(d=divisors(n)); sum(i=1,#d,(#d+1-i)*d[i]) \\ Charles R Greathouse IV, Jun 10 2015
-
Python
from sympy import divisors, divisor_sigma def A064945(n): return (divisor_sigma(n,0)+1)*divisor_sigma(n)-sum(a*b for a, b in enumerate(divisors(n),1)) # Chai Wah Wu, Aug 07 2025
Formula
a(n) = Sum_{i=1..tau(n)} (tau(n)-i+1)*d_i, where {d_i}, i=1..tau(n), is the increasing sequence of divisors of n.
From Ridouane Oudra, Aug 02 2025: (Start)
a(n) = Sum_{d|n} d*A135539(n,d).