AMC 10 Step by Step
Printable problems

Primes

Prime properties, prime factorization, counting with primes

What you need to know

  • A prime is a whole number greater than 11 whose only positive divisors are 11 and itself. The number 11 is not prime. Example: 1313 is prime; 15=3⋅515 = 3\cdot5 is not.
  • The small primes are special. 22 is the only even prime, 33 is the only prime divisible by 33, and 55 is the only prime ending in 55.
  • Primes above 33 sit next to multiples of 66. Every prime p>3p > 3 leaves remainder 11 or 55 when divided by 66, written p≡±1(mod6)p \equiv \pm1 \pmod 6. Any other remainder (00, 22, 33, 44) would make pp divisible by 22 or 33. Example: 29=30−129 = 30-1 and 31=30+131 = 30+1. It only works one way: 25=24+125 = 24+1 is not prime.
  • Testing whether nn is prime. Divide by the primes up to n\sqrt n; if none divides nn, it is prime. (If n=abn = ab with both aa and bb bigger than n\sqrt n, then abab would be bigger than nn.) So for n<289=172n < 289 = 17^2, checking 2,3,5,7,11,132, 3, 5, 7, 11, 13 is enough. Example: testing 221221, you reach 1313 and find 221=13⋅17221 = 13\cdot17.
  • Primes below 100100 (there are 2525): 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,972, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.
  • If a prime pp divides a product abab, then pp divides aa or pp divides bb. This fails for numbers that aren't prime. Example: 66 divides 4⋅9=364\cdot9 = 36 but divides neither 44 nor 99.

How AMC 10 tests it

  • A quadratic whose roots are both prime, with their sum or product given. An odd sum forces one root to be 22, since two odd primes add to an even number.
  • "For how many primes pp is p2+cp^2+c (or both p+ap+a and p+bp+b) also prime?" The answer is almost always 00 or 11, decided by a small modulus.
  • Arranging digits into two-digit primes, or counting primes with a digit condition. This rewards knowing the primes below 100100 by heart.
  • The smallest prime factor of a large expression such as 220−12^{20}-1 or n!+1n!+1, using algebraic factoring.
  • These show up as problems 6–18 and test speed and attention to odd and even rather than deep theory.

Standard approaches

  1. Handle 22 (and often 33) separately; every prime left is odd and not a multiple of 33.
  2. Work mod 33, 44, or 66. Show that in every case but one, the expression is divisible by a small prime and bigger than it, so it is not prime.
  3. Factor with algebra before hunting for prime divisors: a2−b2=(a−b)(a+b)a^2-b^2 = (a-b)(a+b), the sum of cubes a3+b3=(a+b)(a2−ab+b2)a^3+b^3 = (a+b)(a^2-ab+b^2), and x4+4y4=(x2+2xy+2y2)(x2−2xy+2y2)x^4+4y^4 = (x^2+2xy+2y^2)(x^2-2xy+2y^2). Example: 220−1=(210−1)(210+1)=1023⋅10252^{20}-1 = (2^{10}-1)(2^{10}+1) = 1023\cdot1025, and 1023=3⋅3411023 = 3\cdot341, so the smallest prime factor is 33.
  4. Use Vieta's Formulas to turn "prime roots" into a sum-and-product condition on two primes.
  5. When the count is small, list the cases. Know the primes below 100100 by heart.

Worked example

How many primes pp have the property that both p+10p + 10 and p+14p + 14 are also prime?

(A) 00 (B) 11 (C) 22 (D) 33 (E) infinitely many

Step 1: remainders mod 33. 1010 leaves remainder 11 and 1414 leaves remainder 22 when divided by 33. So pp, p+10p+10, p+14p+14 leave the same remainders as pp, p+1p+1, p+2p+2.

Step 2: one is a multiple of 33. One of any three integers in a row is a multiple of 33, so one of pp, p+10p+10, p+14p+14 is divisible by 33. For example, p=7p = 7 gives 77, 1717, 2121, and 21=3⋅721 = 3\cdot7.

Step 3: it must be 33 itself. The only prime divisible by 33 is 33. Since p+10p+10 and p+14p+14 are bigger than 33, the multiple of 33 must be pp, so p=3p = 3.

Step 4: check. 1313 and 1717 are both prime, so exactly one prime works.

The answer is (B) 1\boxed{\textbf{(B)}\ 1}.

Pitfalls

  • Treating 11 as prime, or forgetting that 22 is prime when counting.
  • Stopping trial division too early, or going past n\sqrt n. Example: stopping at 77 would wrongly call 187187 prime, but 187=11⋅17187 = 11\cdot17. To test 9797, you can stop at 77, since 112=121>9711^2 = 121 > 97.
  • Deciding a number divisible by 33 is not prime without checking that it is bigger than 33. That is exactly why p=3p = 3 works above.
  • Misremembering the list: 91=7⋅1391 = 7\cdot13 and 57=3⋅1957 = 3\cdot19 are not prime, while 9797 and 8989 are.

Traps that recur

  • Taking b_1 = 60 (so 61!/60! = 61) without checking whether a smaller b_1 still lets the leftover primes cancel. (2013 AMC 10B #20)
  • Missing that the two factors must have the same parity, and then wasting time on pairs like 1 x 48 or 3 x 16, or accepting q = 8 or p = 1 as prime. (2005 AMC 10A #24)
  • Stopping at the primes 71 and 73 and reporting a digit sum of one of them (8 or 10), instead of the next prime 79. (2022 AMC 10B #13)
  • Testing only p = 2 and p = 3 and picking the first expression that looks composite, without checking the other choices produce a prime for some p. (2018 AMC 10B #11)

Problems © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. The topic note, tags and key insights are original to this site.