login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A328181
a(n) = (-1)^(bigomega(n) - omega(n)) * Sum_{d|n} (-1)^(bigomega(d) - omega(d)) * d.
1
1, 3, 4, 1, 6, 12, 8, 7, 5, 18, 12, 4, 14, 24, 24, 9, 18, 15, 20, 6, 32, 36, 24, 28, 19, 42, 22, 8, 30, 72, 32, 23, 48, 54, 48, 5, 38, 60, 56, 42, 42, 96, 44, 12, 30, 72, 48, 36, 41, 57, 72, 14, 54, 66, 72, 56, 80, 90, 60, 24, 62, 96, 40, 41, 84, 144, 68, 18, 96, 144
OFFSET
1,2
LINKS
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
KEYWORD
nonn,mult
AUTHOR
Ilya Gutkovskiy, Oct 06 2019
STATUS
approved