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”).
%I #39 Aug 13 2024 01:56:13
%S 0,0,0,1,0,0,0,2,1,0,0,2,0,0,0,3,0,2,0,2,0,0,0,4,1,0,2,2,0,0,0,4,0,0,
%T 0,5,0,0,0,4,0,0,0,2,2,0,0,6,1,2,0,2,0,4,0,4,0,0,0,4,0,0,2,5,0,0,0,2,
%U 0,0,0,8,0,0,2,2,0,0,0,6,3,0,0,4,0,0,0,4,0,4,0,2,0,0,0,8,0,2,2,5,0,0,0,4,0
%N Number of non-unitary divisors of n.
%C Number of zeros in row n of table A225817. - _Reinhard Zumkeller_, Jul 30 2013
%H Reinhard Zumkeller, <a href="/A048105/b048105.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = Sigma(0, n) - 2^r(n), where r() = A001221, the number of distinct primes dividing n.
%F From _Reinhard Zumkeller_, Jul 30 2013: (Start)
%F a(n) = A000005(n) - A034444(n).
%F For n > 1: a(n) = A000005(n) - 2 * A007875(n). (End)
%F Dirichlet g.f.: zeta(s)^2 - zeta(s)^2/zeta(2*s). - _Geoffrey Critzer_, Dec 10 2014
%F G.f.: Sum_{k>=1} (1 - mu(k)^2)*x^k/(1 - x^k). - _Ilya Gutkovskiy_, Apr 21 2017
%F Sum_{k=1..n} a(k) ~ (1-6/Pi^2)*n*log(n) + ((1-6/Pi^2)*(2*gamma-1)+(72*zeta'(2)/Pi^4))*n , where gamma is Euler's constant (A001620). - _Amiram Eldar_, Nov 27 2022
%e Example 1: If n is squarefree (A005117) then a(n)=0 since all divisors are unitary.
%e Example 2: n=12, d(n)=6, ud(n)=4, nud(12)=d(12)-ud(12)=2; from {1,2,3,4,6,12} {1,3,4,12} are unitary while {2,6} are not unitary divisors.
%e Example 3: n=p^k, a true prime power, d(n)=k+1, u(d)=2^r(x)=2, so nud(n)=d(p^k)-2=k+1 i.e., it can be arbitrarily large.
%p with(NumberTheory):
%p seq(SumOfDivisors(n, 0) - 2^NumberOfPrimeFactors(n, 'distinct'), n = 1..105);
%p # _Peter Luschny_, Jul 27 2023
%t Table[DivisorSigma[0, n] - 2^PrimeNu[n], {n, 1, 50}] (* _Geoffrey Critzer_, Dec 10 2014 *)
%o (Haskell)
%o a048105 n = length [d | d <- [1..n], mod n d == 0, gcd d (n `div` d) > 1]
%o -- _Reinhard Zumkeller_, Aug 17 2011
%o (PARI) a(n)=my(f=factor(n)[,2]); prod(i=1,#f,f[i]+1)-2^#f \\ _Charles R Greathouse IV_, Sep 18 2015
%o (Python)
%o from math import prod
%o from sympy import factorint
%o def A048105(n): return -(1<<len(f:=factorint(n).values()))+prod(e+1 for e in f) # _Chai Wah Wu_, Aug 12 2024
%Y Cf. A000005, A001221, A007875, A056170, A225817, A034444.
%Y Cf. A001620, A229099, A306016.
%K nonn
%O 1,8
%A _Labos Elemer_