OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Distinct Prime Factors.
Eric Weisstein's World of Mathematics, Prime Factor.
FORMULA
a(p) = p + 1, where p is prime.
Multiplicative with a(p^e) = (p^(e+1) - (-1)^e*(2*p+1))/(p+1). - Amiram Eldar, Dec 02 2020
Sum_{k=1..n} a(k) ~ c * n^2, where c = (Pi^2/30) * Product_{p prime} (1 + 2/p^2 - 2/p^3) = 0.5507877576... . - Amiram Eldar, Nov 06 2022
MATHEMATICA
a[n_] := (-1)^(PrimeOmega[n] - PrimeNu[n]) Sum[(-1)^(PrimeOmega[d] - PrimeNu[d]) d, {d, Divisors[n]}]; Table[a[n], {n, 1, 70}]
f[p_, e_] := (p^(e+1) - (-1)^e *(2*p+1))/(p+1); a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Dec 02 2020 *)
PROG
(PARI) a(n) = (-1)^(bigomega(n)-omega(n))*sumdiv(n, d, (-1)^(bigomega(d)-omega(d))*d); \\ Michel Marcus, Oct 06 2019
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Ilya Gutkovskiy, Oct 06 2019
STATUS
approved