%I
%S 0,0,0,1,0,0,0,1,1,0,0,2,0,0,0,1,0,2,0,2,0,0,0,2,1,0,1,2,0,0,0,1,0,0,
%T 0,3,0,0,0,2,0,0,0,2,2,0,0,2,1,2,0,2,0,2,0,2,0,0,0,4,0,0,2,1,0,0,0,2,
%U 0,0,0,3,0,0,2,2,0,0,0,2,1,0,0,4,0,0,0,2,0,4,0,2,0,0,0,2,0,2,2,3,0,0,0,2,0
%N Number of squarefree divisors which are not unitary. Also number of unitary divisors which are not squarefree.
%C Numbers of unitary and of squarefree divisors are identical, although the 2 sets are usually different, so sizes of parts outside overlap are also equal to each other.
%H Antti Karttunen, <a href="/A056674/b056674.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F a(n) = A034444(n)  A056671(n) = A034444(n)  A000005(A055231(n)) = A034444(n)  A000005(A007913(n)/A055229(n)).
%e n=252, it has 18 divisors, 8 are unitary, 8 are squarefree, 2 belong to both classes, so 6 are squarefree but not unitary, thus a(252)=6. Set {2,3,14,21,42} forms squarefree but nonunitary while set {4,9,36,28,63,252} of same size gives the set of not squarefree but unitary divisors.
%t Table[DivisorSum[n, 1 &, And[SquareFreeQ@ #, ! CoprimeQ[#, n/#]] &], {n, 105}] (* _Michael De Vlieger_, Jul 19 2017 *)
%o (PARI)
%o A034444(n) = (2^omega(n));
%o A057521(n) = { my(f=factor(n)); prod(i=1, #f~, if(f[i, 2]>1, f[i, 1]^f[i, 2], 1)); } \\ _Charles R Greathouse IV_, Aug 13 2013
%o A055231(n) = n/A057521(n);
%o A056674(n) = (A034444(n)  numdiv(A055231(n)));
%o \\ Or:
%o A055229(n) = { my(c=core(n)); gcd(c, n/c); }; \\ _Charles R Greathouse IV_, Nov 20 2012
%o A056674(n) = ((2^omega(n))  numdiv(core(n)/A055229(n)));
%o \\ _Antti Karttunen_, Jul 19 2017
%o (Python)
%o from sympy import gcd, primefactors, divisor_count
%o from sympy.ntheory.factor_ import core
%o def a055229(n):
%o c=core(n)
%o return gcd(c, n/c)
%o def a056674(n): return 2**len(primefactors(n))  divisor_count(core(n)/a055229(n))
%o print map(a056674, range(1, 101)) # _Indranil Ghosh_, Jul 19 2017
%Y Cf. A000005, A007913, A034444, A000005, A055231, A055229, A056671.
%K nonn
%O 1,12
%A _Labos Elemer_, Aug 10 2000
