login
A337180
a(n) = Sum_{d|n} d * gcd(d,n/d).
3
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,2
COMMENTS
If p is prime, a(n) = Sum_{d|p} d * gcd(d,p/d) = 1*1 + p*1 = p + 1. - Wesley Ivan Hurt, May 21 2021
LINKS
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
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 *)
PROG
(PARI) a(n) = sumdiv(n, d, d*gcd(d, n/d)); \\ Michel Marcus, Jan 29 2021
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Wesley Ivan Hurt, Jan 28 2021
STATUS
approved