OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
FORMULA
Multiplicative with a(p^e) = (p^(e+1)-p^floor((e+1)/2))/(p-1).
G.f.: Sum_{k>=1} k * x^(k^2) / (1 - x^(k^2))^2. - Ilya Gutkovskiy, Aug 19 2021
Sum_{k=1..n} a(k) ~ zeta(3)*n^2/2. - Vaclav Kotesovec, Aug 19 2021
a(n) = n * Sum_{d^2|n} 1/d. - Wesley Ivan Hurt, Feb 14 2022
MAPLE
a:= n-> mul((i[1]^(i[2]+1)-i[1]^iquo(i[2]+1, 2))/(i[1]-1), i=ifactors(n)[2]):
seq(a(n), n=1..77); # Alois P. Heinz, Jan 20 2021
MATHEMATICA
f[p_, e_] := (p^(e + 1) - p^Floor[(e + 1)/2])/(p - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 20 2021 *)
PROG
(PARI) A340774(n) = { my(f=factor(n)); prod(i=1, #f~, my(p=f[i, 1], e=f[i, 2]); ((p^(e+1)-(p^((e+1)\2))) / (p-1))); }; \\ Antti Karttunen, Aug 19 2021
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Werner Schulte, Jan 20 2021
STATUS
approved