Back to Discrete Math for Shockers
Prime Numbers
Unique factorization as the Fundamental Theorem of Arithmetic, the infinitude of primes, and trial division as a test for primality.
StatusFlagsLoading your progress…
4 exercises
Exercise 1
Find the prime factorization of each of the following integers:
- 39
- 125
- 101
- 143
- 289
- 899
2.5
Exercise 2
Find the prime factorization of (10 factorial, not “yay ten!”)
2.5
Exercise 3
Using the is_it_prime function above (or write your own in your favorite language!), factor the following large integers.
- 654321
- 123456
- 987654321
- 123456789
2.5
Exercise 4
Prove that every prime number greater than 3 is either one more or one less than a multiple of 6.
2.5
Adapted from Discrete Math for Shockers © 2021 John Hammond. Licensed under CC BY-SA 4.0. Source: Discrete Math for Shockers. Imported at revision 2538beb.