A337180 a(n) = Sum_{d|n} d * gcd(d,n/d).
1, 3, 4, 9, 6, 12, 8, 21, 19, 18, 12, 36, 14, 24, 24, 53, 18, 57, 20, 54, 32, 36, 24, 84, 51, 42, 64, 72, 30, 72, 32, 117, 48, 54, 48, 171, 38, 60, 56, 126, 42, 96, 44, 108, 114, 72, 48, 212, 99, 153, 72, 126, 54, 192, 72, 168, 80, 90, 60, 216, 62, 96, 152, 277, 84, 144
Offset: 1
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
Programs
-
Mathematica
Table[Sum[k*GCD[k, n/k] (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}] (* Second program: *) Table[DivisorSum[n, # GCD[#, n/#] &], {n, 100}] (* Michael De Vlieger, Nov 11 2021 *)
-
PARI
a(n) = sumdiv(n, d, d*gcd(d, n/d)); \\ Michel Marcus, Jan 29 2021
Formula
Multiplicative with a(p^e) = (p^(2*floor(e/2)+2)-1)/(p^2-1) + p^e*ceiling(e/2). - Sebastian Karlsson, Nov 11 2021
Sum_{k=1..n} a(k) ~ c * n^2, where c = (5*zeta(4))/(4*zeta(3)) = 1.1254908... . - Amiram Eldar, Nov 18 2022
Comments