I have a homework to hand in and they asked this question. I don't know if I'm supposed to count 1 as a prime to that number or not.
In my case $p=3947$, so I count 3945 numbers fitting that criteria since $p$ is prime.
Is this correct ?
Thanks.
I have a homework to hand in and they asked this question. I don't know if I'm supposed to count 1 as a prime to that number or not.
In my case $p=3947$, so I count 3945 numbers fitting that criteria since $p$ is prime.
Is this correct ?
Thanks.
The correct terminology is 'co-prime' with p. And there's a known formula for it. Euler's totient. look at http://en.wikipedia.org/wiki/Euler_totient_function.