OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
FORMULA
G.f.: Sum_{k>=1} mu(rad(k)) * lambda(k) * x^k / (1 - x^k)^2.
a(p) = p + 1, where p is prime.
From Amiram Eldar, Dec 01 2022: (Start)
Multiplicative with a(p^e) = p^e + (p^e-(-1)^e)/(p+1).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2+2)/(p^2+1)) = 0.7207673679... . (End)
MAPLE
with(numtheory):
a:= n-> n*add((-1)^(bigomega(d)-nops(factorset(d)))/d, d=divisors(n)):
seq(a(n), n=1..80); # Alois P. Heinz, Sep 21 2019
MATHEMATICA
a[n_] := n Sum[(-1)^(PrimeOmega[d] - PrimeNu[d])/d, {d, Divisors[n]}]; Table[a[n], {n, 1, 70}]
f[p_, e_] := p^e + (p^e-(-1)^e)/(p+1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 01 2022 *)
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^f[i, 2] + (f[i, 1]^f[i, 2] - (-1)^f[i, 2])/(f[i, 1]+1)); } \\ Amiram Eldar, Dec 01 2022
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Ilya Gutkovskiy, Sep 21 2019
STATUS
approved