A068074 a(n) = Sum_{d|n} (-1)^d*2^omega(n/d) where omega(x) is the number of distinct prime factors in the factorization of x.
-1, -1, -3, 1, -3, -3, -3, 3, -5, -3, -3, 3, -3, -3, -9, 5, -3, -5, -3, 3, -9, -3, -3, 9, -5, -3, -7, 3, -3, -9, -3, 7, -9, -3, -9, 5, -3, -3, -9, 9, -3, -9, -3, 3, -15, -3, -3, 15, -5, -5, -9, 3, -3, -7, -9, 9, -9, -3, -3, 9, -3, -3, -15, 9, -9, -9, -3, 3, -9, -9, -3, 15, -3, -3, -15, 3, -9, -9, -3, 15, -9, -3, -3, 9, -9, -3, -9, 9, -3
Offset: 1
References
- Gérald Tenenbaum and Jie Wu, Cours spécialisés No. 2: "Exercices corrigés de théorie analytique et probabiliste des nombres", Collection SMF, chapter II.7.1, p. 105.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a068074 n | odd n = - a048691 n | otherwise = 2 * a048691 (n `div` 2) - a048691 n -- Reinhard Zumkeller, Jul 12 2012
-
Mathematica
a[n_?OddQ] := -DivisorSigma[0, n^2]; a[n_?EvenQ] := 2*DivisorSigma[0, n^2/4] - DivisorSigma[0, n^2]; Table[a[n], {n, 1, 89}] (* Jean-François Alcover, Nov 15 2011, after Vladeta Jovovic *) f[p_, e_] := 2*e + 1; f[2, e_] := 3-2*e; a[1] = -1; a[n_] := -Times @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = sumdiv(n, d, (-1)^d*2^omega(n/d)); \\ Michel Marcus, Oct 08 2017
-
PARI
a(n) = -numdiv(n^2) + if(!(n%2), 2*numdiv(n^2/4)); \\ Amiram Eldar, Apr 24 2025
Formula
Asymptotic formula: Sum_{k=1..n} a(k)/k ~ -C*log(n)^2 with C = 3*log(2)/Pi^2.
a(n) = -tau(n^2) for odd n and 2*tau(n^2/4) - tau(n^2) for even n. b(n) = abs(a(n)) is multiplicative with b(2^e) = abs(2*e-3) and b(p^e) = 2*e+1 for an odd prime p. - Vladeta Jovovic, Apr 25 2002
a(n) = if n odd then -A048691(n) else 2*A048691(n/2) - A048691(n). - Reinhard Zumkeller, Jul 12 2012
From Amiram Eldar, Apr 24 2025: (Start)
More precisely, b(n) = -a(n) is multiplicative with b(2^e) = 3-2*e and b(p^e) = 2*e+1 for an odd prime p.
Dirichlet g.f.: -(zeta(s)^3/zeta(2*s)) * (1-1/2^(s-1)).
Sum_{k=1..n} a(k) ~ -(log(2)/zeta(2)) * n * (log(n) + 3*gamma - 1 - log(2)/2 - 2*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). (End)