1. Home
  2. Explore
  3. Mathematics
  4. Large Prime Number Generation

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Large Prime Number Generation

  • 30Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Fermat's Theorem
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is Fermat's Little Theorem?

Tap to flipClick to flipspace

For a prime ppp and integer aaa not divisible by ppp, ap−1≡1(modp)a^{p-1} \equiv 1 \pmod{p}ap−1≡1(modp).

Or swipe the card

30 cards

  1. What is Fermat's Little Theorem?

    For a prime ppp and integer aaa not divisible by ppp, ap−1≡1(modp)a^{p-1} \equiv 1 \pmod{p}ap−1≡1(modp).

  2. In Fermat's Little Theorem, what condition on aaa is necessary?

    aaa must not be a multiple of ppp (i.e., aaa and ppp are coprime).

  3. How does the Fermat Primality Test work?

    Choose a base a<na < na<n. Compute an−1mod  na^{n-1} \mod nan−1modn. If ≠1\neq 1=1, nnn is composite; if =1= 1=1, nnn may be prime.

  4. In the Fermat Primality Test, what is a 'witness'?

    A base aaa such that an−1≢1(modn)a^{n-1} \not\equiv 1 \pmod{n}an−1≡1(modn), proving nnn is composite.

  5. In the Fermat Primality Test, what is a 'liar'?

    A base aaa such that an−1≡1(modn)a^{n-1} \equiv 1 \pmod{n}an−1≡1(modn) even though nnn is composite.

  6. Define Carmichael numbers.

    Composite numbers nnn that satisfy an−1≡1(modn)a^{n-1} \equiv 1 \pmod{n}an−1≡1(modn) for all aaa coprime to nnn.

  7. Give an example of a Carmichael number.

    561 = 3 × 11 × 17.

  8. Why does base 42 act as a witness for composite 561 in the Fermat test?

    Because 42 shares a factor (3) with 561, so 42560≢1(mod561)42^{560} \not\equiv 1 \pmod{561}42560≡1(mod561).

  9. Who discovered the first seven Carmichael numbers?

    Václav Šimerka.

  10. What did Paul Erdős conjecture about Carmichael numbers?

    That there are infinitely many.

  11. Who proved there are infinitely many Carmichael numbers and in what year?

    Red Alford, Andrew Granville, and Carl Pomerance in 1994.

  12. How does Miller's test improve upon Fermat's test?

    It breaks the exponent an−1a^{n-1}an−1 into a sequence by repeatedly dividing the exponent by 2 until odd, allowing detection of composite numbers that satisfy the Fermat condition.

  13. What are the two conditions of Miller's primality test for a base aaa?

    (1) The final term in the sequence (an−1mod  na^{n-1} \mod nan−1modn) must be 1. (2) Whenever a term in the sequence is 1, the previous term must be either 1 or n−1n-1n−1.

  14. Why is the square root property important in Miller's test?

    For a prime modulus ppp, the only square roots of 1 mod ppp are 1 and p−1p-1p−1. If the sequence shows a square root of 1 that is not ±1\pm 1±1, then nnn must be composite.

  15. Give an example of a Carmichael number that Miller's test correctly identifies as composite.

    n=561n=561n=561 with base a=100a=100a=100. Sequence: 298, 166, 67, 1, 1. Final 1, but previous 67 is not 1 or 560, so condition (2) fails.

  16. Show that Miller's test can still have liars. Give an example.

    n=221n=221n=221, a=174a=174a=174. Sequence: 47, 220, 1. Conditions satisfied (final 1, previous 220 = n−1n-1n−1), but 221=13×17221 = 13 \times 17221=13×17 is composite.

  17. Under what assumption did Miller prove his test is deterministic (always correct)?

    The Extended Riemann Hypothesis (ERH). If ERH holds, for any composite nnn, there is a witness base less than 2(ln⁡n)22(\ln n)^22(lnn)2.

  18. What is the Miller-Rabin primality test?

    A probabilistic version of Miller's test that uses random bases. It determines primality with high probability by repeating the test.

  19. For any odd composite number, what proportion of bases are witnesses in the Miller-Rabin test?

    At least 75% (3/4).

  20. What is the probability of a false positive (composite marked prime) after 10 random iterations of Miller-Rabin?

    At most 1 in a million (0.0001%).

  21. What role does Miller-Rabin play in internet security?

    It is used to generate large prime numbers for encryption algorithms (e.g., RSA).

  22. What is the Prime Number Theorem's estimate for the density of primes near a large integer NNN?

    Approximately 1/ln⁡(N)1/\ln(N)1/ln(N).

  23. Describe the basic algorithm for generating a large prime number.

    (1) Pick a random nnn-digit number; (2) Test if it is prime (e.g., with Miller-Rabin); (3) If prime, output it; otherwise, repeat.

  24. What is the expected number of random trials to find an nnn-digit prime?

    About 2.3n2.3n2.3n trials (since density is ∼1/(2.3n)\sim 1/(2.3n)∼1/(2.3n)).

  25. Why is the generation of large primes feasible for computers?

    The Prime Number Theorem ensures a reasonable density; Miller-Rabin tests each candidate quickly (milliseconds). Thousands of trials take only minutes.

  26. What is the AKS primality test?

    A deterministic primality test invented in 2002 by Agrawal, Kayal, and Saxena. It is always correct but slower than Miller-Rabin.

  27. What is modular exponentiation and why is it important?

    An efficient way to compute abmod  na^b \mod nabmodn without huge intermediate numbers. Used in all modular arithmetic in primality tests.

  28. Who invented the Miller primality test?

    Gary Miller, a PhD student at UC Berkeley in the early 1970s.

  29. Who popularized the probabilistic version of Miller's test?

    Michael Rabin, who published it in 1980.

  30. What two conditions must hold for a base aaa to pass Miller's test for a candidate prime nnn?

    (1) an−1≡1(modn)a^{n-1} \equiv 1 \pmod{n}an−1≡1(modn); (2) In the sequence of repeated square roots, every square root of 1 encountered is either 1 or n−1n-1n−1.

Card 1 of 30
Card 1 of 30

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent