# Number of positive divisiors with gcd condition

1. Oct 25, 2012

### thippli

Let n be a positive integer and a be a positive divisor of n. Is there any general formula to find the number of positive divisors b of n such that (a,b)=1 ?.

2. Oct 25, 2012

### ramsey2879

No. That would be a formula to factor a number but there isn't any.

3. Oct 25, 2012

### Norwegian

Yes. There is a general formula. First, you should understand the well known formula d(n)=∏(ri+1) for the number of divisors of n, where n=∏piri is the prime factorization of n. See for example wikipedia or OEIS.

In your case, it is the same product as for d(n), except you dont run it over all primes, but exclude the primes dividing a.