24
Fibonacci Pseudoprimes and their Place in Primality Testing Carly Allen Faculty Mentor, Dr. Webster Butler University Department of Mathematics December 11, 2015 Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Fibonacci Pseudoprimes and their Place inPrimality Testing

Carly AllenFaculty Mentor, Dr. Webster

Butler UniversityDepartment of Mathematics

December 11, 2015

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 2: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Outline

1 Motivation

Primality TestingEncryption

2 Building Blocks of Fibonacci Pseudoprimes

3 The Fibonacci Primality Theorem

4 Theorem Becomes Primality Test

5 Pseudoprimes

6 The Test in a Larger Context

7 Future Work

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 3: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Motivation

Why study Fibonacci pseudoprimes?

1 Primality Testing

How do we determine if an extremely large integers are prime?

2 Encryption

How does primality testing and pseudoprimes play a role inreal-world applications? Does it at all?

Definition

Encryption: the process of converting data to an unrecognizable or”encrypted” form.

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 4: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Building Blocks of Fibonacci Pseudoprimes

1 Prime Numbers

DefinitionExamples and Patterns

2 Trial Division3 Fermat Base-2 Primality Test

PseudoprimesPrevalence of Pseudoprimes using this Test

4 The Fibonacci Numbers

5 Legendre Symbol

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 5: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Prime Numbers and Testing for Primality

How do we determine if a large integer is prime or composite?

Definition

A prime number (or a prime) is a natural number greater than 1that has no positive divisors other than 1 and itself.

i.e. 2, 3, 5, 7, 11, 13, 17, 19, ...

Integer Factorization vs. Primality Testing

In testing for primality, we do not wish to break an integerdown into its’ prime factors, but rather we wish to statewhether the input is prime or not.

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 6: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Trial Division

A simple, yet time-consuming method for primality testing.

Example:Is 49 a prime?Does 2 divide it? No.Does 3 divide it? No.Does 5 divide it? No.Does 7 divide it? YES!

To check if n, an integer, is prime, we may test up to√n integers.

What if n=589328201? There must be a better way!

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 7: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Fermat’s Little Theorem

Theorem

Fermat’s Little Theorem, as a special case, says for any oddprime p, 2p−1 ≡ 1 (mod p).

Theorem

Base-2 Fermat Test: For a given odd integer n > 1, if

2n−1 6≡ 1 (mod n),

then n is composite. If the result is 1, call n “probably prime.”

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 8: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Definition of a Pseudoprime

Using the Base-2 Fermat test, every prime number will return“probably prime.” The test, though is not perfect and somecomposite numbers will additionally return “probably prime.”When this happens, such a number is considered a pseudoprime.

Take n = 341.2341−1 (mod 341) ≡ 1 (mod 341).

=⇒ probably prime.BUT 341 = 11 · 31

Definition

A base-2 pseudoprime is is a composite number n that“passes”(or returns “probably prime”) the base-2 Fermat primality test.

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 9: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Fibonacci Numbers

Definition

Fibonacci numbers are numbers in the Fibonacci sequence. Thesequence Fn of Fibonacci numbers is defined by the recurrencerelation:

F0 = 0 and F1 = 1

Fn = Fn−1 + Fn−2

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, . . .

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 10: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Legendre Symbol

Definition

Let p be an odd prime. For any integer m, the Legendre symbol( pm ) is defined as follows:

( pm

)=

+1 if m is quadratic residue modulo p.−1 if m is quadratic nonresidue modulo p.0 if p divides m.

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 11: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Motivation for the Fibonacci Primality Theorem

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987 . . .

Fibonacci Sequence (mod 7):0, 1, 1, 2, 3, 5, 1, 6, 0, 6, 6, 5, 4, 2, 6, 1, 0 . . .

Fibonacci Sequence (mod 11):0, 1, 1, 2, 3, 5, 8, 2, 10, 1, 0, 1, 1, 2, 3, 5, 8 . . .

Fibonacci Sequence (mod 13):0, 1, 1, 2, 3, 5, 8, 0, 8, 8, 3, 11, 1, 12, 0, 12, 12 . . .

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 12: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Fibonnaci Primality Theorem

Theorem

If n is a prime, then Fn−( 5n ) ≡ 0 (mod n), where

(5

n

)=

1 if n ≡ ±1 (mod 5)−1 if n ≡ ±2 (mod 5)0 if n ≡ 0 (mod 5)

Theorem

If Fn−( 5n ) 6≡ 0 (mod n), then n is composite. If the result is 0, call

n “probably prime.”

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 13: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Examples

Take n=51.

51 ≡ 1 (mod 5) =⇒(

5

51

)= 1

Fn−( 5n ) = F51−1 = F50

F50 = 12586269025

12586269025 6≡ 0 (mod 51). =⇒ Composite

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 14: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Examples

Take n=341.

341 ≡ 1 (mod 5) =⇒(

5

341

)= 1

Fn−( 5n ) = F341−1 = F340

F340 6≡ 0 (mod 341). =⇒ Composite

***Note, this was a pseudoprime under Fermat’s base-2 test!

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 15: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Examples Continued

Take n=47.

47 ≡ 2 (mod 5) =⇒(

5

47

)= −1

Fn−( 5n ) = F47−(−1) = F48

F48 = 4807526976

4807526976 ≡ 0 (mod 47). =⇒ Probably prime

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 16: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Proving the Fibonacci Primality Theorem

In essence, the proof is based on the idea that the Fibonaccisequence is an example of a Lucas Sequence.

The Lucas Sequence may be understood as arithmetic in

R = Z[x ]/(x2 − ax + b.

)Two cases must then be considered.

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 17: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Proof Continued

Case 1: x2 − ax + b is reducible modulo p.In this case,

R = Z/(pZ)× Z/(pZ),

where |Rx | = (p − 1)2.

Case 2: x2 − ax + b is irreducible modulo p.In this case, R = Fp2 , where

|Rx | =(p2 − 1

)= (p − 1) (p + 1) .

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 18: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Fibonacci Pseudoprime Example

The first example of a Fibbonacci Pseudoprime occurs when wetake n=323. We know 323 = 17 · 19.

323 ≡ 3 (mod 5) =⇒(

5

323

)= −1

Fn−( 5n ) = F323−(−1) = F324

F324 = 23041483585524168262220906489642018075101617466780496790573690289968

F324 ≡ 0 (mod 323) =⇒ Probably Prime!

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 19: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Comparing the Prevalence of Pseudoprimes

n fpsp’s psp(2)’s fpsp(2)’s

103 2 3 0104 9 22 1105 50 78 4106 155 245 15107 511 750 50108 1460 2057 134109 4152 5597 3771010 11049 14884 9681011 29334 38975 25171012 - 101629 62221013 - 264239 155891014 - 687007 387491015 - 1801533 98116

Dominic W. Klyve and Daniel MonfreCarly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 20: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Fibonacci Primality Test in a Larger Context

As you can see, combining tests is POWERFUL. Let’s see anotherexample of a powerful combination of primality tests.

Definition

The BPSW (Baillie, Pomerance, Selfridge, Wagstaff) Test is a“probabilistic primality testing algorithm” that combines a base-2Fermat test with a Lucas Probable Prime Test.

No fpsp(2)’s yet found are congruent to 2 or 3 modulo 5.

The BPSW test finds the first D in the sequence 5, -7, 9, -11,13, -15, . . . for which the Jacobi symbol

(Dn

)is −1.

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 21: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

BPSW

No composite up to 264 passes the BPSW Test.

The power of the BPSW test lies in the fact Fermatpseudoprimes and Lucas pseudoprimes share no knownnumbers.

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 22: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Fibonacci Primality Test in a Larger Context, Cont.

$620

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 23: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Future Work

What questions are still needing to be considered concerningFibonacci Pseudoprimes?

1 Proof or Counterexample of BPSW Primality Test

2 A more efficient algorithm at determining the number ofpseudoprimes. (Dr. Webster)

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing

Page 24: Fibonacci Pseudoprimes and their Place in Primality Testingmisscarlyallen.weebly.com/uploads/2/7/5/7/27572755/final_colloquim... · 1 if n 1 (mod 5) 1 if n 2 (mod 5) 0 if n 0 (mod

Questions

Thank you! Questions?

Carly Allen Faculty Mentor, Dr. Webster Fibonacci Pseudoprimes and their Place in Primality Testing