Skip to content
← All questions

Why does a prime number p satisfy φ(p)=p−1φ(p) = p - 1?

For a prime number pp, the only positive divisors are 1 and pp itself. Any integer aa in the range from 1 to pp that is not equal to pp will not share the factor pp. Since pp is prime, it has no other factors, so gcd⁡(a,p)=1\gcd(a, p) = 1 for all aa from 1 to p−1p-1. There are exactly p−1p-1 such integers, so φ(p)=p−1\varphi(p) = p - 1.

Conditions

  • pp is a prime number.
  • φ(p)\varphi(p) is defined as the count of integers from 1 to pp that are coprime to pp.

Reasoning, step by step

  1. Let pp be a prime number.
  2. Consider the integers from 1 to pp.
  3. Note that all integers from 1 to p−1p-1 do not contain pp as a factor.
  4. Since pp is prime, its only factors are 1 and pp. Therefore, any integer less than pp shares no common factors with pp other than 1.
  5. This means gcd⁡(a,p)=1\gcd(a, p) = 1 for all a∈{1,2,…,p−1}a \in \{1, 2, \ldots, p-1\}.
  6. Count the number of such integers, which is p−1p - 1.
  7. Conclude that φ(p)=p−1\varphi(p) = p - 1.

Example

Let p=5p=5. The integers from 1 to 5 are 1, 2, 3, 4, 5. The greatest common divisors with 5 are: gcd⁡(1,5)=1\gcd(1,5)=1, gcd⁡(2,5)=1\gcd(2,5)=1, gcd⁡(3,5)=1\gcd(3,5)=1, gcd⁡(4,5)=1\gcd(4,5)=1, gcd⁡(5,5)=5\gcd(5,5)=5. The integers coprime to 5 are 1, 2, 3, and 4. There are 5−1=45-1=4 such integers. Thus, φ(5)=4\varphi(5) = 4.

Common misconceptions

  • Thinking that 1 is not coprime to pp (1 is coprime to every positive integer).
  • Believing that φ(p)\varphi(p) counts the number of primes less than pp (it counts all integers coprime to pp, not just primes).

Watch the explanation

Explore next

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.