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”).

a(n) = (-1)^(bigomega(n) - omega(n)) * Sum_{d|n} (-1)^(bigomega(d) - omega(d)) * d.
1

%I #15 Nov 06 2022 03:16:45

%S 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,

%T 22,8,30,72,32,23,48,54,48,5,38,60,56,42,42,96,44,12,30,72,48,36,41,

%U 57,72,14,54,66,72,56,80,90,60,24,62,96,40,41,84,144,68,18,96,144

%N a(n) = (-1)^(bigomega(n) - omega(n)) * Sum_{d|n} (-1)^(bigomega(d) - omega(d)) * d.

%H Amiram Eldar, <a href="/A328181/b328181.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DistinctPrimeFactors.html">Distinct Prime Factors</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeFactor.html">Prime Factor</a>.

%F a(p) = p + 1, where p is prime.

%F Multiplicative with a(p^e) = (p^(e+1) - (-1)^e*(2*p+1))/(p+1). - _Amiram Eldar_, Dec 02 2020

%F 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

%t a[n_] := (-1)^(PrimeOmega[n] - PrimeNu[n]) Sum[(-1)^(PrimeOmega[d] - PrimeNu[d]) d, {d, Divisors[n]}]; Table[a[n], {n, 1, 70}]

%t 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 *)

%o (PARI) a(n) = (-1)^(bigomega(n)-omega(n))*sumdiv(n, d, (-1)^(bigomega(d)-omega(d))*d); \\ _Michel Marcus_, Oct 06 2019

%Y Cf. A001221, A001222, A008836, A046660, A049060, A055076, A061020, A076479, A162511.

%K nonn,mult

%O 1,2

%A _Ilya Gutkovskiy_, Oct 06 2019