login
Number of unitary divisors of n (A034444) - number of non-unitary divisors of n (A048105).
6

%I #22 Dec 09 2022 07:07:08

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

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

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

%N Number of unitary divisors of n (A034444) - number of non-unitary divisors of n (A048105).

%H Antti Karttunen, <a href="/A048106/b048106.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 2^(1+omega(n)) - d(n) = 2^(1+A001221(n)) - A000005(n).

%F a(n) = -Sum_{ d divides n } (-1)^mu(d). - _Vladeta Jovovic_, Jan 24 2002

%F From _Amiram Eldar_, Dec 09 2022: (Start)

%F a(n) > 0 iff n is in A048107.

%F a(n) < 0 iff n is in A048111.

%F a(n) <= 0 iff n is in A048108.

%F a(n) = 0 iff n is in A048109.

%F Dirichlet g.f: zeta(s)^2*(2/zeta(2*s) - 1).

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

%t Table[2^(1 + PrimeNu@ n) - DivisorSigma[0, n], {n, 99}] (* _Michael De Vlieger_, Aug 01 2017 *)

%o (PARI) A048106(n) = (2^(1+omega(n)) - numdiv(n)); \\ _Antti Karttunen_, May 25 2017

%o (Python)

%o from sympy import divisor_count, primefactors

%o def a(n): return 1 if n==1 else 2**(1 + len(primefactors(n))) - divisor_count(n) # _Indranil Ghosh_, May 25 2017

%Y Cf. A000005, A001221, A008683, A034444, A048105.

%Y Cf. A048107, A048108, A048109, A048111.

%Y Cf. A001620, A306016.

%K sign

%O 1,2

%A _Labos Elemer_