Generalization of Totient Function

166 Views Asked by At

Totient function gives us the count of of all numbers(k) upto n which satisfy the equation gcd(k,n)=1. How can I find the count of all such k's which satisfy gcd(k,n)=d for some natural number d?

1

There are 1 best solutions below

0
On BEST ANSWER

Assuming that $d$ divides $n$, then $\gcd(k,n)=d \implies \gcd(k/d, n/d) = 1$ so the count of such values you'd be looking for is $\phi(n/d)$.