A048106 Number of unitary divisors of n (A034444) - number of non-unitary divisors of n (A048105).
1, 2, 2, 1, 2, 4, 2, 0, 1, 4, 2, 2, 2, 4, 4, -1, 2, 2, 2, 2, 4, 4, 2, 0, 1, 4, 0, 2, 2, 8, 2, -2, 4, 4, 4, -1, 2, 4, 4, 0, 2, 8, 2, 2, 2, 4, 2, -2, 1, 2, 4, 2, 2, 0, 4, 0, 4, 4, 2, 4, 2, 4, 2, -3, 4, 8, 2, 2, 4, 8, 2, -4, 2, 4, 2, 2, 4, 8, 2, -2, -1, 4, 2, 4, 4, 4, 4, 0, 2, 4, 4, 2, 4, 4, 4, -4, 2, 2, 2
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Table[2^(1 + PrimeNu@ n) - DivisorSigma[0, n], {n, 99}] (* Michael De Vlieger, Aug 01 2017 *)
-
PARI
A048106(n) = (2^(1+omega(n)) - numdiv(n)); \\ Antti Karttunen, May 25 2017
-
Python
from sympy import divisor_count, primefactors def a(n): return 1 if n==1 else 2**(1 + len(primefactors(n))) - divisor_count(n) # Indranil Ghosh, May 25 2017
Formula
a(n) = -Sum_{ d divides n } (-1)^mu(d). - Vladeta Jovovic, Jan 24 2002
From Amiram Eldar, Dec 09 2022: (Start)
a(n) > 0 iff n is in A048107.
a(n) < 0 iff n is in A048111.
a(n) <= 0 iff n is in A048108.
a(n) = 0 iff n is in A048109.
Dirichlet g.f: zeta(s)^2*(2/zeta(2*s) - 1).
Sum_{k=1..n} a(k) ~ (12/Pi^2 - 1)*n*log(n) + ((12/Pi^2-1)*(2*gamma-1) - (24/Pi^2)*zeta'(2)/zeta(2))*n, where gamma is Euler's constant (A001620). (End)