1
$\begingroup$

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.

  • 1
    I would definitely count 1, since the normal definition if "prime to ..." is that the greatest common factor should be 1.2012-11-15
  • 2
    There are not 3945 primes lower than $3947$.2012-11-15
  • 1
    I understand that he is not counting primes below $p$, but rather numbers below $p$ which are "prime to $p$", i.e. relatively prime to $p$.2012-11-15
  • 0
    It seems likely that your homework question is asking "How many numbers exist that are smaller than $p$ and prime with $p$?" In this case, you should definitely count 1. But you ask "How many *prime* numbers...?", which is a very different question. A number can be prime with 3947 without actually being a prime number. For the sake of getting the right answer, be sure you understand the difference between these two questions and figure out which question your homework is asking.2012-11-15
  • 1
    @JonasKibelbek : I edited the question to be clearer. You're right that it's a different question.2012-11-15
  • 2
    $p=3947$ is prime. Therefore the answer is $\phi(p)=p-1=3946$.2012-11-15

1 Answers 1

1

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.

  • 0
    Thanks, in short $3947$ is the answer I was looking for. Euler's totient function clarified my confusion.2012-11-15
  • 0
    If you take the average of your 2 answers then you are correct!2012-11-15