Achievable logoAchievable logo
AMC
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Algebra
2. Geometry
3. Number theory
3.1 Factors and multiples
3.2 Prime numbers
3.3 Modular arithmetic
4. Counting and probability
5. Intermediate topics (AMC 10/12)
6. Advanced topics (AMC 12)
7. General approaches
8. Practical strategies
Wrapping up
Achievable logoAchievable logo
3.2 Prime numbers
Achievable AMC
3. Number theory

Prime numbers

4 min read
Font
Discuss
Share
Feedback

This chapter applies to all AMC 8/10/12 test takers.

Prime numbers show up constantly on the AMC. A prime number is a positive integer that has exactly two positive divisors: 1 and itself. The only even prime is 2.

You’ll want to recognize any prime number below 100, and you should be able to list all primes below 50 from memory. Try writing them out, then compare your list to the one below.

(spoiler)

2,3,5,7,11,13,17,19,23,29,31,37,41,43,47

Why are prime numbers important?

In the real world, primes matter in cryptography, computer science, and even music. On the AMC, primes appear in many settings, especially problems involving:

  • prime factorization
  • GCD and LCM
  • modular arithmetic
  • relatively prime integers

Prime factorization

A common way to find a prime factorization is the factor tree method. The idea is simple:

  • Split the number into two factors.
  • Keep factoring any composite factors.
  • Stop when every branch ends in a prime.

The prime factorization is the list of primes at the ends of the branches (including repeats). You don’t need to worry about picking “the right” factors at each step: no matter which factors you choose first, you’ll end with the same prime factorization.

60/\415/ \/ \2235​

As shown above, the prime factorization of 60 is 22×31×51.

Example: The question below is from 2007 AMC 8

What is the sum of the two smallest prime factors of 250?
A. 2
B. 5
C. 7
D. 10
E. 12

(spoiler)

Answer: C. 7

Modular arithmetic and primes

Fermat’s Little Theorem is a useful tool in modular arithmetic. It says

  • If p is prime and a is not divisible by p, then raising a to the power p−1 leaves a remainder of 1 when divided by p.

ap−1≡1(mod p)

For example, take a=8 and p=3. Since 3 does not divide 8, Fermat’s Little Theorem applies, so 83−1≡1 (mod 3).

a=8, p=3

pap−1​ = 383−1​

382​ = 364​

21 remainder 1

Example: The question below is from 2017 AMC 10B

An integerN is selected at random in the range 1≤N≤2020 . What is the probability that the remainder when N16 is divided by 5 is 1?
A. 51​
B. 52​
C. 53​
D. 54​
E. 1

(spoiler)

Answer: D. 54​

Relatively prime integers

Two integers are relatively prime (or coprime) if they share no common prime factors. The numbers themselves do not have to be prime.

For example, 14 and 25 are relatively prime. Even though neither number is prime, they have no common divisor other than 1.

Example: The question below is from 2021 AMC 12A

Consider the set of all fractionsyx​, where x and y are relatively prime positive integers. How many of these fractions have the property that if both numerator and denominator are increased by 1, the value of the fraction is increased by 10%?
A. 0
B. 1
C. 2
D. 3
E. infinitely many

(spoiler)

Answer: B. 1

Common themes

  • A semiprime is any number that is the product of two prime numbers.
  • Don’t expect to factor with extremely large primes.
  • Look out for Mersenne primes: 2n−1. The most relevant Mersenne primes are 3,7,31,127.

Prime numbers basics

  • Prime: positive integer with exactly two positive divisors (1 and itself)
  • Only even prime: 2
  • Know all primes below 50; recognize primes below 100Importance of primes on AMC
  • Appear in problems involving:
    • Prime factorization
    • GCD and LCM
    • Modular arithmetic
    • Relatively prime integersPrime factorization
  • Use factor tree: split into factors until all are prime
  • Prime factorization is unique (up to order)
  • Example: 60=22×31×51Modular arithmetic and primes
  • Fermat’s Little Theorem: ap−1≡1(modp) if p is prime and p∤a
  • Useful for finding remainders in exponentiation problemsRelatively prime integers
  • Two numbers are relatively prime if they share no common prime factors
  • Numbers do not need to be prime themselvesCommon themes
  • Semiprime: product of two primes
  • Mersenne primes: numbers of form 2n−1 (notable examples: 3, 7, 31, 127)
  • AMC problems rarely require factoring very large primes

Sign up for free to take 6 quiz questions on this topic

Previous
Next  | 3.3 Modular arithmetic
All rights reserved ©2016 - 2026 Achievable, Inc.

Prime numbers

This chapter applies to all AMC 8/10/12 test takers.

Prime numbers show up constantly on the AMC. A prime number is a positive integer that has exactly two positive divisors: 1 and itself. The only even prime is 2.

You’ll want to recognize any prime number below 100, and you should be able to list all primes below 50 from memory. Try writing them out, then compare your list to the one below.

(spoiler)

2,3,5,7,11,13,17,19,23,29,31,37,41,43,47

Why are prime numbers important?

In the real world, primes matter in cryptography, computer science, and even music. On the AMC, primes appear in many settings, especially problems involving:

  • prime factorization
  • GCD and LCM
  • modular arithmetic
  • relatively prime integers

Prime factorization

A common way to find a prime factorization is the factor tree method. The idea is simple:

  • Split the number into two factors.
  • Keep factoring any composite factors.
  • Stop when every branch ends in a prime.

The prime factorization is the list of primes at the ends of the branches (including repeats). You don’t need to worry about picking “the right” factors at each step: no matter which factors you choose first, you’ll end with the same prime factorization.

60/\415/ \/ \2235​

As shown above, the prime factorization of 60 is 22×31×51.

Example: The question below is from 2007 AMC 8

What is the sum of the two smallest prime factors of 250?
A. 2
B. 5
C. 7
D. 10
E. 12

(spoiler)

Answer: C. 7

Modular arithmetic and primes

Fermat’s Little Theorem is a useful tool in modular arithmetic. It says

  • If p is prime and a is not divisible by p, then raising a to the power p−1 leaves a remainder of 1 when divided by p.

ap−1≡1(mod p)

For example, take a=8 and p=3. Since 3 does not divide 8, Fermat’s Little Theorem applies, so 83−1≡1 (mod 3).

a=8, p=3

pap−1​ = 383−1​

382​ = 364​

21 remainder 1

Example: The question below is from 2017 AMC 10B

An integerN is selected at random in the range 1≤N≤2020 . What is the probability that the remainder when N16 is divided by 5 is 1?
A. 51​
B. 52​
C. 53​
D. 54​
E. 1

(spoiler)

Answer: D. 54​

Relatively prime integers

Two integers are relatively prime (or coprime) if they share no common prime factors. The numbers themselves do not have to be prime.

For example, 14 and 25 are relatively prime. Even though neither number is prime, they have no common divisor other than 1.

Example: The question below is from 2021 AMC 12A

Consider the set of all fractionsyx​, where x and y are relatively prime positive integers. How many of these fractions have the property that if both numerator and denominator are increased by 1, the value of the fraction is increased by 10%?
A. 0
B. 1
C. 2
D. 3
E. infinitely many

(spoiler)

Answer: B. 1

Common themes

  • A semiprime is any number that is the product of two prime numbers.
  • Don’t expect to factor with extremely large primes.
  • Look out for Mersenne primes: 2n−1. The most relevant Mersenne primes are 3,7,31,127.
Key points

Prime numbers basics

  • Prime: positive integer with exactly two positive divisors (1 and itself)
  • Only even prime: 2
  • Know all primes below 50; recognize primes below 100Importance of primes on AMC
  • Appear in problems involving:
    • Prime factorization
    • GCD and LCM
    • Modular arithmetic
    • Relatively prime integersPrime factorization
  • Use factor tree: split into factors until all are prime
  • Prime factorization is unique (up to order)
  • Example: 60=22×31×51Modular arithmetic and primes
  • Fermat’s Little Theorem: ap−1≡1(modp) if p is prime and p∤a
  • Useful for finding remainders in exponentiation problemsRelatively prime integers
  • Two numbers are relatively prime if they share no common prime factors
  • Numbers do not need to be prime themselvesCommon themes
  • Semiprime: product of two primes
  • Mersenne primes: numbers of form 2n−1 (notable examples: 3, 7, 31, 127)
  • AMC problems rarely require factoring very large primes

More from Number theory

  • Factors and multiples
  • Modular arithmetic