PRIMALITY TEST FOR FERMAT NUMBERS USING QUARTIC RECURRENCE EQUATION. Predrag Terzic Podgorica, Montenegro

Size: px
Start display at page:

Download "PRIMALITY TEST FOR FERMAT NUMBERS USING QUARTIC RECURRENCE EQUATION. Predrag Terzic Podgorica, Montenegro"

Transcription

1 PRIMALITY TEST FOR FERMAT NUMBERS USING QUARTIC RECURRENCE EQUATION Predrag Terzic Podgorica, Montenegro Abstract. We present deterministic primality test for Fermat numbers, F n = n + 1, where n. Essentially this test is similar to the Lucas-Lehmer primality test for Mersenne numbers. 1. Introduction. Fermat numbers were first studied by Pierre de Fermat, who conjuctured that all Fermat numbers are prime. This conjecture was refuted by Leonhard Euler in 173 when he showed that F 5 is composite. It is known that F n is composite for 5 n 3. Question,are there infinitely many Fermat primes is still an open problem. In 1856 Edouard Lucas has developed primality test for Mersenne numbers. Test was improved by Lucas in 1878 and Derrick Lehmer in 1930 s. The test uses a sequence S i defined by S 0 = 4 and S i+1 = S i for i 1. Mersenne number M p is prime if and only if M p divides S p. In this paper we give primality test for Fermat numbers using quartic recurrsive equation : S i = S 4 i 1 4S i 1 +. The test uses a sequence defined by this recursion.. The test and Proof of correctness.1. The test. Let F n = n + 1 with n. In pseudocode the test might be written : //Determine if F n = n + 1 is prime FermatPrime(n) var S = 8 var F = n + 1 repeat n 1 1 times : S = (((S S) ) ((S S) ) ) (mod F ) if S = 0 return PRIME else return COMPOSITE Date: January 11, 01. 1

2 PREDRAG TERZIC.. Proof of correctness. Let us define sequence S i as : { 8 if i = 0; S i = (Si 1 ) otherwise. Theorem.1. F n = n + 1, (n ) is a prime if and only if F n divides S n 1 1. Proof. Let us define ω = and ω = 4 15 and then define L n to be ω n + ω n, we get L 0 = ω + ω = 8, and L n+1 = ω n+ + ω n+ = (ω n+1 ) + ( ω n+1 ) = = (ω n+1 + ω n+1 ) ω n+1 ω n+1 = = ((ω n + ω n ) ω n ω n ) ω n+1 ω n+1 = = ((ω n + ω n ) (ω ω) n ) (ω ω) n+1 and since ω ω = 1 we get : L n+1 = (L n ) Because the L n satisfy the same inductive definition as the sequence S i, the two sequences must be the same. Proof of necessity : If n + 1 is prime then S n 1 1 is divisible by n + 1 We rely on simplification of the proof of Lucas-Lehmer test by Oystein J. R. Odseth, see [1].First notice that 3 is quadratic non-residue (mod F n ) and that 5 is quadratic non-residue (mod F n ). Euler s criterion then gives us : 3 Fn 1 1 (mod F n ) and 5 Fn 1 1 (mod F n ) On the other hand is a quadratic-residue (mod F n ), Euler s criterion gives: Fn 1 1 (mod F n ) Next define σ = 15, and define X as the multiplicative group of {a + b 15 a, b Z Fn }.We will use following lemmas : Lemma.1. : (x + y) Fn = x Fn + y Fn (mod F n ) Lemma.. : a Fn a (mod F n ) (Fermat little theorem) Then in group X we have : (6 + σ) Fn (6) Fn + (σ) Fn = 6 + ( 15) Fn

3 PRIMALITY TEST FOR FERMAT NUMBERS USING QUARTIC RECURRENCE EQUATION3 = 6 + Fn 15 Fn 1 15 = Fn 1 5 Fn 1 15 = 6 + ( 1) ( 1) 15 = (6 + σ) (mod F n ) We chose σ such that ω = (6+σ). We can use this to compute ω Fn 1 4 in the group X : ω Fn 1 = (6+σ)Fn 1 4 Fn 1 where we use fact that : = (6+σ)Fn (6+σ) 4 Fn 1 (6+σ) (6+σ) ( 1) (mod F n) = 1 (mod F n ) 4 Fn 1 = ( Fn 1 ) 3 (3 Fn 1 ) (1 3 ) ( 1) 1 (mod F n ) So we have shown that : ω Fn 1 1 (mod F n ) If we write this as ω n +1 1 = ω n 1 = ω n ω n 1 (mod F n ),multiply both sides by ω n, and put both terms on the left hand side to write this as : ω n + ω n 0 (mod F n ) ω (n 1 1) + ω (n 1 1) 0 (mod F n ) S n (mod F n ) Since the left hand side is an integer this means therefore that S n 1 1 must be divisible by n + 1. Proof of sufficiency : If S n 1 1 is divisible by n + 1, then n + 1 is prime We rely on simplification of the proof of Lucas-Lehmer test by J. W. Bruce, see [].If n + 1 is not prime then it must be divisible by some prime factor F less than or equal to the square root of n + 1. From the hypothesis S n 1 1 is divisible by n + 1 so S n 1 1 is also multiple of F, so we can write : ω (n 1) + ω (n 1) = K F, for some integer K. We can write this equality as : ω n + ω n = K F Note that ω ω = 1 so we can multiply both sides by ω n and rewrite

4 4 PREDRAG TERZIC this relation as : ω n 1 = K F ω n 1. If we square both sides we get : ω n = (K F ω n 1) Now consider the set of numbers a + b 15 for integers a and b where a + b 15 and c + d 15 are considered equivalent if a and c differ by a multiple of F, and the same is true for b and d. There are F of these numbers, and addition and multiplication can be verified to be welldefined on sets of equivalent numbers. Given the element ω (considered as representative of an equivalence class), the associative law allows us to use exponential notation for repeated products : ω n = ω ω ω, where the product contains n factors and the usual rules for exponents can be justified. Consider the sequence of elements ω, ω, ω Because ω has the inverse ω every element in this sequence has an inverse. So there can be at most F 1 different elements of this sequence. Thus there must be at least two different exponents where ω j = ω k with j < k F. Multiply j times by inverse of ω to get that ω k j = 1 with 1 k j F 1. So we have proven that ω satisfies ω n = 1 for some positive exponent n less than or equal to F 1. Define the order of ω to be smallest positive integer d such that ω d = 1. So if n is any other positive integer satisfying ω n = 1 then n must be multiple of d. Write n = q d+r with r < d. Then if r 0 we have 1 = ω n = ω q d+r = (ω d ) q ωr = 1 q ωr = ω r contradicting the minimality of d so r = 0 and n is multiple of d. The relation ω n = (K F ω n 1) shows that ω n 1 (mod F ). So that n must be multiple of the order of ω. But the relation ω n 1 = K F ω n 1 shows that ω n 1 1 (mod F ) so the order cannot be any proper factor of n, therefore the order must be n. Since this order is less than or equal to F 1 and F is less or equal to the square root of n +1 we have relation : n F 1 n. This is true only if n = F 1 n + 1 = F. We will show that Fermat number cannot be square of prime factor. Theorem.. Any prime divisor p of F n = n + 1 is of the form k n+ + 1 whenever n is greater than one. Proof. For proof see [3] So prime factor F must be of the form k n+ + 1, therefore we can write : n + 1 = (k n+ + 1) n + 1 = k n+4 + k n+ + 1

5 PRIMALITY TEST FOR FERMAT NUMBERS USING QUARTIC RECURRENCE EQUATION5 n = k n+3 (k n+1 + 1) The last equality cannot be true since k n is an odd number and n has no odd prime factors so n +1 F and therefore we have relation n < F 1 < n which is contradiction so therefore n + 1 must be prime. 3. Acknowledgments I wish to express my gratitude to Bojan Terzic for grammatical improvement of the text. References 1. Proof of necessity by Oystein J. R. Odseth available at : http : //en.wikipedia.org/wiki/lucas Lehmer primality test. Proof of sufficiency by J. W. Bruce available at : http : // Lehmer T est 3. Proof of Edouard Lucas theorem available at : http : //en.wikipedia.org/wiki/f ermat number

Lucas Lehmer primality test - Wikipedia, the free encyclopedia

Lucas Lehmer primality test - Wikipedia, the free encyclopedia Lucas Lehmer primality test From Wikipedia, the free encyclopedia In mathematics, the Lucas Lehmer test (LLT) is a primality test for Mersenne numbers. The test was originally developed by Edouard Lucas

More information

Problem Set 5 Solutions

Problem Set 5 Solutions Problem Set 5 Solutions Section 4.. Use mathematical induction to prove each of the following: a) For each natural number n with n, n > + n. Let P n) be the statement n > + n. The base case, P ), is true

More information

Corollary 4.2 (Pepin s Test, 1877). Let F k = 2 2k + 1, the kth Fermat number, where k 1. Then F k is prime iff 3 F k 1

Corollary 4.2 (Pepin s Test, 1877). Let F k = 2 2k + 1, the kth Fermat number, where k 1. Then F k is prime iff 3 F k 1 4. Primality testing 4.1. Introduction. Factorisation is concerned with the problem of developing efficient algorithms to express a given positive integer n > 1 as a product of powers of distinct primes.

More information

On the Composite Terms in Sequence Generated from Mersenne-type Recurrence Relations

On the Composite Terms in Sequence Generated from Mersenne-type Recurrence Relations On the Composite Terms in Sequence Generated from Mersenne-type Recurrence Relations Pingyuan Zhou E-mail:zhoupingyuan49@hotmail.com Abstract We conjecture that there is at least one composite term in

More information

Discrete Structures Lecture Primes and Greatest Common Divisor

Discrete Structures Lecture Primes and Greatest Common Divisor DEFINITION 1 EXAMPLE 1.1 EXAMPLE 1.2 An integer p greater than 1 is called prime if the only positive factors of p are 1 and p. A positive integer that is greater than 1 and is not prime is called composite.

More information

LARGE PRIME NUMBERS (32, 42; 4) (32, 24; 2) (32, 20; 1) ( 105, 20; 0).

LARGE PRIME NUMBERS (32, 42; 4) (32, 24; 2) (32, 20; 1) ( 105, 20; 0). LARGE PRIME NUMBERS 1. Fast Modular Exponentiation Given positive integers a, e, and n, the following algorithm quickly computes the reduced power a e % n. (Here x % n denotes the element of {0,, n 1}

More information

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is LARGE PRIME NUMBERS 1. Fermat Pseudoprimes Fermat s Little Theorem states that for any positive integer n, if n is prime then b n % n = b for b = 1,..., n 1. In the other direction, all we can say is that

More information

Fermat s Little Theorem. Fermat s little theorem is a statement about primes that nearly characterizes them.

Fermat s Little Theorem. Fermat s little theorem is a statement about primes that nearly characterizes them. Fermat s Little Theorem Fermat s little theorem is a statement about primes that nearly characterizes them. Theorem: Let p be prime and a be an integer that is not a multiple of p. Then a p 1 1 (mod p).

More information

Sums of Squares. Bianca Homberg and Minna Liu

Sums of Squares. Bianca Homberg and Minna Liu Sums of Squares Bianca Homberg and Minna Liu June 24, 2010 Abstract For our exploration topic, we researched the sums of squares. Certain properties of numbers that can be written as the sum of two squares

More information

Basic Proof Examples

Basic Proof Examples Basic Proof Examples Lisa Oberbroeckling Loyola University Maryland Fall 2015 Note. In this document, we use the symbol as the negation symbol. Thus p means not p. There are four basic proof techniques

More information

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. Math 152, Problem Set 2 solutions (2018-01-24) All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. 1. Let us look at the following equation: x 5 1

More information

History of Mathematics

History of Mathematics History of Mathematics Paul Yiu Department of Mathematics Florida Atlantic University Summer 2011 6A: Fermat: Beginning of modern number theory (2) Fermat s little theorem Given a prime p, and any geometric

More information

Primality tests for specific classes ofn = k 2 m ±1

Primality tests for specific classes ofn = k 2 m ±1 Primality tests for specific classes ofn k 2 m ±1 Predrag Terzić Bulevar Pera Ćetkovića 19, Podgorica, Moteegro e-mail: pedja.terzic@hotmail.com arxiv:1506.0444v1 [math.nt] 10 Ju 2015 Abstract: Polyomial

More information

Selected Chapters from Number Theory and Algebra

Selected Chapters from Number Theory and Algebra Selected Chapters from Number Theory and Algebra A project under construction Franz Rothe Department of Mathematics University of North Carolina at Charlotte Charlotte, NC 83 frothe@uncc.edu December 8,

More information

Primality Proofs. Geoffrey Exoo Department of Mathematics and Computer Science Indiana State University Terre Haute, IN

Primality Proofs. Geoffrey Exoo Department of Mathematics and Computer Science Indiana State University Terre Haute, IN Primality Proofs Geoffrey Exoo Department of Mathematics and Computer Science Indiana State University Terre Haute, IN 47809 ge@cs.indstate.edu July 30, 2013 Abstract There is an web site [1] that lists

More information

God may not play dice with the universe, but something strange is going on with the prime numbers.

God may not play dice with the universe, but something strange is going on with the prime numbers. Primes: Definitions God may not play dice with the universe, but something strange is going on with the prime numbers. P. Erdös (attributed by Carl Pomerance) Def: A prime integer is a number whose only

More information

Divisibility in the Fibonacci Numbers. Stefan Erickson Colorado College January 27, 2006

Divisibility in the Fibonacci Numbers. Stefan Erickson Colorado College January 27, 2006 Divisibility in the Fibonacci Numbers Stefan Erickson Colorado College January 27, 2006 Fibonacci Numbers F n+2 = F n+1 + F n n 1 2 3 4 6 7 8 9 10 11 12 F n 1 1 2 3 8 13 21 34 89 144 n 13 14 1 16 17 18

More information

LARGE PRIME NUMBERS. In sum, Fermat pseudoprimes are reasonable candidates to be prime.

LARGE PRIME NUMBERS. In sum, Fermat pseudoprimes are reasonable candidates to be prime. LARGE PRIME NUMBERS 1. Fermat Pseudoprimes Fermat s Little Theorem states that for any positive integer n, if n is prime then b n % n = b for b = 1,..., n 1. In the other direction, all we can say is that

More information

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1 MATH 4400 SOLUTIONS TO SOME EXERCISES 1.1.3. If a b and b c show that a c. 1. Chapter 1 Solution: a b means that b = na and b c that c = mb. Substituting b = na gives c = (mn)a, that is, a c. 1.2.1. Find

More information

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9.1 Chapter 9 Objectives

More information

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2,

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2, MATH 4400 roblems. Math 4400/6400 Homework # solutions 1. Let P be an odd integer not necessarily rime. Show that modulo, { P 1 0 if P 1, 7 mod, 1 if P 3, mod. Proof. Suose that P 1 mod. Then we can write

More information

Ch 5.7: Series Solutions Near a Regular Singular Point, Part II

Ch 5.7: Series Solutions Near a Regular Singular Point, Part II Ch 5.7: Series Solutions Near a Regular Singular Point, Part II! Recall from Section 5.6 (Part I): The point x 0 = 0 is a regular singular point of with and corresponding Euler Equation! We assume solutions

More information

Part II. Number Theory. Year

Part II. Number Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 Paper 3, Section I 1G 70 Explain what is meant by an Euler pseudoprime and a strong pseudoprime. Show that 65 is an Euler

More information

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

CHAPTER 6. Prime Numbers. Definition and Fundamental Results CHAPTER 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results 6.1. Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and the only positive divisors of p are 1 and p. If n

More information

Induction. Induction. Induction. Induction. Induction. Induction 2/22/2018

Induction. Induction. Induction. Induction. Induction. Induction 2/22/2018 The principle of mathematical induction is a useful tool for proving that a certain predicate is true for all natural numbers. It cannot be used to discover theorems, but only to prove them. If we have

More information

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. Chapter 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. If n > 1

More information

Chapter 1. Number of special form. 1.1 Introduction(Marin Mersenne) 1.2 The perfect number. See the book.

Chapter 1. Number of special form. 1.1 Introduction(Marin Mersenne) 1.2 The perfect number. See the book. Chapter 1 Number of special form 1.1 Introduction(Marin Mersenne) See the book. 1.2 The perfect number Definition 1.2.1. A positive integer n is said to be perfect if n is equal to the sum of all its positive

More information

The Impossibility of Certain Types of Carmichael Numbers

The Impossibility of Certain Types of Carmichael Numbers The Impossibility of Certain Types of Carmichael Numbers Thomas Wright Abstract This paper proves that if a Carmichael number is composed of primes p i, then the LCM of the p i 1 s can never be of the

More information

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction Math 4 Summer 01 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

A SURVEY OF PRIMALITY TESTS

A SURVEY OF PRIMALITY TESTS A SURVEY OF PRIMALITY TESTS STEFAN LANCE Abstract. In this paper, we show how modular arithmetic and Euler s totient function are applied to elementary number theory. In particular, we use only arithmetic

More information

Prime and Perfect Numbers

Prime and Perfect Numbers Prime and Perfect Numbers 0.3 Infinitude of prime numbers 0.3.1 Euclid s proof Euclid IX.20 demonstrates the infinitude of prime numbers. 1 The prime numbers or primes are the numbers 2, 3, 5, 7, 11, 13,

More information

Wilson s Theorem and Fermat s Little Theorem

Wilson s Theorem and Fermat s Little Theorem Wilson s Theorem and Fermat s Little Theorem Wilson stheorem THEOREM 1 (Wilson s Theorem): (p 1)! 1 (mod p) if and only if p is prime. EXAMPLE: We have (2 1)!+1 = 2 (3 1)!+1 = 3 (4 1)!+1 = 7 (5 1)!+1 =

More information

Equivalence of Pepin s and the Lucas-Lehmer Tests

Equivalence of Pepin s and the Lucas-Lehmer Tests EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS Vol., No. 3, 009, (35-360) ISSN 1307-5543 www.ejpam.com Equivalence of Pepin s and the Lucas-Lehmer Tests John H. Jaroma Department of Mathematics & Physics,

More information

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element. The first exam will be on Monday, June 8, 202. The syllabus will be sections. and.2 in Lax, and the number theory handout found on the class web site, plus the handout on the method of successive squaring

More information

NUMBER THEORY. Anwitaman DATTA SCSE, NTU Singapore CX4024. CRYPTOGRAPHY & NETWORK SECURITY 2018, Anwitaman DATTA

NUMBER THEORY. Anwitaman DATTA SCSE, NTU Singapore CX4024. CRYPTOGRAPHY & NETWORK SECURITY 2018, Anwitaman DATTA NUMBER THEORY Anwitaman DATTA SCSE, NTU Singapore Acknowledgement: The following lecture slides are based on, and uses material from the text book Cryptography and Network Security (various eds) by William

More information

The Fibonacci Quarterly 44(2006), no.2, PRIMALITY TESTS FOR NUMBERS OF THE FORM k 2 m ± 1. Zhi-Hong Sun

The Fibonacci Quarterly 44(2006), no.2, PRIMALITY TESTS FOR NUMBERS OF THE FORM k 2 m ± 1. Zhi-Hong Sun The Fibonacci Quarterly 44006, no., 11-130. PRIMALITY TESTS FOR NUMBERS OF THE FORM k m ± 1 Zhi-Hong Sun eartment of Mathematics, Huaiyin Teachers College, Huaian, Jiangsu 3001, P.R. China E-mail: zhsun@hytc.edu.cn

More information

Math in the News: Mersenne Primes

Math in the News: Mersenne Primes Math in the News: Mersenne Primes Helmut Knaust Department of Mathematical Sciences The University of Texas at El Paso El Paso TX 79968-0514 hknaust@utep.edu Greater El Paso Council of Teachers of Mathematics

More information

Math 261 Spring 2014 Final Exam May 5, 2014

Math 261 Spring 2014 Final Exam May 5, 2014 Math 261 Spring 2014 Final Exam May 5, 2014 1. Give a statement or the definition for ONE of the following in each category. Circle the letter next to the one you want graded. For an extra good final impression,

More information

[Part 2] Asymmetric-Key Encipherment. Chapter 9. Mathematics of Cryptography. Objectives. Contents. Objectives

[Part 2] Asymmetric-Key Encipherment. Chapter 9. Mathematics of Cryptography. Objectives. Contents. Objectives [Part 2] Asymmetric-Key Encipherment Mathematics of Cryptography Forouzan, B.A. Cryptography and Network Security (International Edition). United States: McGraw Hill, 2008. Objectives To introduce prime

More information

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald) Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald) 1 Euclid s Algorithm Euclid s Algorithm for computing the greatest common divisor belongs to the oldest known computing procedures

More information

EXAMPLES OF MORDELL S EQUATION

EXAMPLES OF MORDELL S EQUATION EXAMPLES OF MORDELL S EQUATION KEITH CONRAD 1. Introduction The equation y 2 = x 3 +k, for k Z, is called Mordell s equation 1 on account of Mordell s long interest in it throughout his life. A natural

More information

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time. 8 Modular Arithmetic We introduce an operator mod. Let d be a positive integer. For c a nonnegative integer, the value c mod d is the remainder when c is divided by d. For example, c mod d = 0 if and only

More information

Math 319 Problem Set #2 Solution 14 February 2002

Math 319 Problem Set #2 Solution 14 February 2002 Math 39 Problem Set # Solution 4 February 00. (.3, problem 8) Let n be a positive integer, and let r be the integer obtained by removing the last digit from n and then subtracting two times the digit ust

More information

Introduction to Number Theory

Introduction to Number Theory INTRODUCTION Definition: Natural Numbers, Integers Natural numbers: N={0,1,, }. Integers: Z={0,±1,±, }. Definition: Divisor If a Z can be writeen as a=bc where b, c Z, then we say a is divisible by b or,

More information

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers. MATH 4 Summer 011 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

Classification of Finite Fields

Classification of Finite Fields Classification of Finite Fields In these notes we use the properties of the polynomial x pd x to classify finite fields. The importance of this polynomial is explained by the following basic proposition.

More information

School of Mathematics

School of Mathematics School of Mathematics Programmes in the School of Mathematics Programmes including Mathematics Final Examination Final Examination 06 22498 MSM3P05 Level H Number Theory 06 16214 MSM4P05 Level M Number

More information

On the Cardinality of Mersenne Primes

On the Cardinality of Mersenne Primes On the Cardinality of Mersenne Primes Garimella Rama Murthy, Associate Professor, International Institute of Information Technology (IIIT), Gachibowli, Hyderabad-32,AP,INDIA ABSTRACT In this research paper,

More information

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II CS 5319 Advanced Discrete Structure Lecture 9: Introduction to Number Theory II Divisibility Outline Greatest Common Divisor Fundamental Theorem of Arithmetic Modular Arithmetic Euler Phi Function RSA

More information

Zsigmondy s Theorem. Lola Thompson. August 11, Dartmouth College. Lola Thompson (Dartmouth College) Zsigmondy s Theorem August 11, / 1

Zsigmondy s Theorem. Lola Thompson. August 11, Dartmouth College. Lola Thompson (Dartmouth College) Zsigmondy s Theorem August 11, / 1 Zsigmondy s Theorem Lola Thompson Dartmouth College August 11, 2009 Lola Thompson (Dartmouth College) Zsigmondy s Theorem August 11, 2009 1 / 1 Introduction Definition o(a modp) := the multiplicative order

More information

Number Theory Proof Portfolio

Number Theory Proof Portfolio Number Theory Proof Portfolio Jordan Rock May 12, 2015 This portfolio is a collection of Number Theory proofs and problems done by Jordan Rock in the Spring of 2014. The problems are organized first by

More information

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93. Exercises Exercises 1. Determine whether each of these integers is prime. a) 21 b) 29 c) 71 d) 97 e) 111 f) 143 2. Determine whether each of these integers is prime. a) 19 b) 27 c) 93 d) 101 e) 107 f)

More information

Applied Cryptography and Computer Security CSE 664 Spring 2018

Applied Cryptography and Computer Security CSE 664 Spring 2018 Applied Cryptography and Computer Security Lecture 12: Introduction to Number Theory II Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline This time we ll finish the

More information

Number Theory A focused introduction

Number Theory A focused introduction Number Theory A focused introduction This is an explanation of RSA public key cryptography. We will start from first principles, but only the results that are needed to understand RSA are given. We begin

More information

Number Tree LCM HCF Divisibility Rules Power cycle Remainder Theorem Remainder of powers a n b n Last and Second last digit Power of Exponents Euler s

Number Tree LCM HCF Divisibility Rules Power cycle Remainder Theorem Remainder of powers a n b n Last and Second last digit Power of Exponents Euler s Vedic Numbers Number Tree LCM HCF Divisibility Rules Power cycle Remainder Theorem Remainder of powers a n b n Last and Second last digit Power of Exponents Euler s Theorem Fermet s Theory Wilson Theorem

More information

Pseudoprimes and Carmichael Numbers

Pseudoprimes and Carmichael Numbers Pseudoprimes and Carmichael Numbers Emily Riemer MATH0420 May 3, 2016 1 Fermat s Little Theorem and Primality Fermat s Little Theorem is foundational to the study of Carmichael numbers and many classes

More information

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer. CHAPTER 2 INTRODUCTION TO NUMBER THEORY ANSWERS TO QUESTIONS 2.1 A nonzero b is a divisor of a if a = mb for some m, where a, b, and m are integers. That is, b is a divisor of a if there is no remainder

More information

Try the assignment f(1) = 2; f(2) = 1; f(3) = 4; f(4) = 3;.

Try the assignment f(1) = 2; f(2) = 1; f(3) = 4; f(4) = 3;. I. Precisely complete the following definitions: 1. A natural number n is composite whenever... See class notes for the precise definitions 2. Fix n in N. The number s(n) represents... 3. For A and B sets,

More information

Number Theory Homework.

Number Theory Homework. Number Theory Homewor. 1. The Theorems of Fermat, Euler, and Wilson. 1.1. Fermat s Theorem. The following is a special case of a result we have seen earlier, but as it will come up several times in this

More information

Primes. Rational, Gaussian, Industrial Strength, etc. Robert Campbell 11/29/2010 1

Primes. Rational, Gaussian, Industrial Strength, etc. Robert Campbell 11/29/2010 1 Primes Rational, Gaussian, Industrial Strength, etc Robert Campbell 11/29/2010 1 Primes and Theory Number Theory to Abstract Algebra History Euclid to Wiles Computation pencil to supercomputer Practical

More information

Primality testing: variations on a theme of Lucas. Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA

Primality testing: variations on a theme of Lucas. Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA Primality testing: variations on a theme of Lucas Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA In 1801, Carl Friedrich Gauss wrote: The problem of distinguishing prime numbers from composite

More information

THE TRIANGULAR THEOREM OF THE PRIMES : BINARY QUADRATIC FORMS AND PRIMITIVE PYTHAGOREAN TRIPLES

THE TRIANGULAR THEOREM OF THE PRIMES : BINARY QUADRATIC FORMS AND PRIMITIVE PYTHAGOREAN TRIPLES THE TRIANGULAR THEOREM OF THE PRIMES : BINARY QUADRATIC FORMS AND PRIMITIVE PYTHAGOREAN TRIPLES Abstract. This article reports the occurrence of binary quadratic forms in primitive Pythagorean triangles

More information

ABSTRACT 1. INTRODUCTION

ABSTRACT 1. INTRODUCTION ON PIMES AN TEMS OF PIME O INEX IN THE LEHME SEUENCES John H. Jaroma epartment of Mathematical Sciences, Loyola College in Maryland, Baltimore, M 110 Submitted May 004-Final evision March 006 ABSTACT It

More information

Ma/CS 6a Class 4: Primality Testing

Ma/CS 6a Class 4: Primality Testing Ma/CS 6a Class 4: Primality Testing By Adam Sheffer Reminder: Euler s Totient Function Euler s totient φ(n) is defined as follows: Given n N, then φ n = x 1 x < n and GCD x, n = 1. In more words: φ n is

More information

5: The Integers (An introduction to Number Theory)

5: The Integers (An introduction to Number Theory) c Oksana Shatalov, Spring 2017 1 5: The Integers (An introduction to Number Theory) The Well Ordering Principle: Every nonempty subset on Z + has a smallest element; that is, if S is a nonempty subset

More information

Solutions to Practice Final

Solutions to Practice Final s to Practice Final 1. (a) What is φ(0 100 ) where φ is Euler s φ-function? (b) Find an integer x such that 140x 1 (mod 01). Hint: gcd(140, 01) = 7. (a) φ(0 100 ) = φ(4 100 5 100 ) = φ( 00 5 100 ) = (

More information

Theoretical Cryptography, Lecture 13

Theoretical Cryptography, Lecture 13 Theoretical Cryptography, Lecture 13 Instructor: Manuel Blum Scribe: Ryan Williams March 1, 2006 1 Today Proof that Z p has a generator Overview of Integer Factoring Discrete Logarithm and Quadratic Residues

More information

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION Recall that RSA works as follows. A wants B to communicate with A, but without E understanding the transmitted message. To do so: A broadcasts RSA method,

More information

A Guide to Arithmetic

A Guide to Arithmetic A Guide to Arithmetic Robin Chapman August 5, 1994 These notes give a very brief resumé of my number theory course. Proofs and examples are omitted. Any suggestions for improvements will be gratefully

More information

Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z:

Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z: Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some z Z Notation: b Fact: for all, b, c Z:, 1, and 0 0 = 0 b and b c = c b and c = (b + c) b and b = ±b 1

More information

A Generalization of Wilson s Theorem

A Generalization of Wilson s Theorem A Generalization of Wilson s Theorem R. Andrew Ohana June 3, 2009 Contents 1 Introduction 2 2 Background Algebra 2 2.1 Groups................................. 2 2.2 Rings.................................

More information

Notes on Systems of Linear Congruences

Notes on Systems of Linear Congruences MATH 324 Summer 2012 Elementary Number Theory Notes on Systems of Linear Congruences In this note we will discuss systems of linear congruences where the moduli are all different. Definition. Given the

More information

Algorithms (II) Yu Yu. Shanghai Jiaotong University

Algorithms (II) Yu Yu. Shanghai Jiaotong University Algorithms (II) Yu Yu Shanghai Jiaotong University Chapter 1. Algorithms with Numbers Two seemingly similar problems Factoring: Given a number N, express it as a product of its prime factors. Primality:

More information

Intermediate Math Circles March 6, 2013 Number Theory I

Intermediate Math Circles March 6, 2013 Number Theory I What is Number Theory? Intermediate Math Circles March 6, 01 Number Theory I A branch of mathematics where mathematicians examine and study patterns found within the natural number set (positive integers).

More information

Discrete Logarithms. Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set

Discrete Logarithms. Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set Discrete Logarithms Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set Z/mZ = {[0], [1],..., [m 1]} = {0, 1,..., m 1} of residue classes modulo m is called

More information

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya BBM 205 Discrete Mathematics Hacettepe University http://web.cs.hacettepe.edu.tr/ bbm205 Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya Resources: Kenneth Rosen,

More information

MATH 152 Problem set 6 solutions

MATH 152 Problem set 6 solutions MATH 52 Problem set 6 solutions. Z[ 2] is a Euclidean domain (i.e. has a division algorithm): the idea is to approximate the quotient by an element in Z[ 2]. More precisely, let a+b 2, c+d 2 Z[ 2] (of

More information

A Proof of the Lucas-Lehmer Test and its Variations by Using a Singular Cubic Curve

A Proof of the Lucas-Lehmer Test and its Variations by Using a Singular Cubic Curve 1 47 6 11 Journal of Integer Sequences, Vol. 1 (018), Article 18.6. A Proof of the Lucas-Lehmer Test and its Variations by Using a Singular Cubic Curve Ömer Küçüksakallı Mathematics Department Middle East

More information

Diophantine triples in a Lucas-Lehmer sequence

Diophantine triples in a Lucas-Lehmer sequence Annales Mathematicae et Informaticae 49 (01) pp. 5 100 doi: 10.33039/ami.01.0.001 http://ami.uni-eszterhazy.hu Diophantine triples in a Lucas-Lehmer sequence Krisztián Gueth Lorand Eötvös University Savaria

More information

The running time of Euclid s algorithm

The running time of Euclid s algorithm The running time of Euclid s algorithm We analyze the worst-case running time of EUCLID as a function of the size of and Assume w.l.g. that 0 The overall running time of EUCLID is proportional to the number

More information

CS383, Algorithms Spring 2009 HW1 Solutions

CS383, Algorithms Spring 2009 HW1 Solutions Prof. Sergio A. Alvarez http://www.cs.bc.edu/ alvarez/ 21 Campanella Way, room 569 alvarez@cs.bc.edu Computer Science Department voice: (617) 552-4333 Boston College fax: (617) 552-6790 Chestnut Hill,

More information

The primitive root theorem

The primitive root theorem The primitive root theorem Mar Steinberger First recall that if R is a ring, then a R is a unit if there exists b R with ab = ba = 1. The collection of all units in R is denoted R and forms a group under

More information

MATH 25 CLASS 8 NOTES, OCT

MATH 25 CLASS 8 NOTES, OCT MATH 25 CLASS 8 NOTES, OCT 7 20 Contents. Prime number races 2. Special kinds of prime numbers: Fermat and Mersenne numbers 2 3. Fermat numbers 3. Prime number races We proved that there were infinitely

More information

With Question/Answer Animations. Chapter 4

With Question/Answer Animations. Chapter 4 With Question/Answer Animations Chapter 4 Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their properties. Key ideas in number theory include divisibility

More information

Chapter 5.1: Induction

Chapter 5.1: Induction Chapter.1: Induction Monday, July 1 Fermat s Little Theorem Evaluate the following: 1. 1 (mod ) 1 ( ) 1 1 (mod ). (mod 7) ( ) 8 ) 1 8 1 (mod ). 77 (mod 19). 18 (mod 1) 77 ( 18 ) 1 1 (mod 19) 18 1 (mod

More information

Arithmetic Algorithms, Part 1

Arithmetic Algorithms, Part 1 Arithmetic Algorithms, Part 1 DPV Chapter 1 Jim Royer EECS January 18, 2019 Royer Arithmetic Algorithms, Part 1 1/ 15 Multiplication à la Français function multiply(a, b) // input: two n-bit integers a

More information

Constructing Tower Extensions of Finite Fields for Implementation of Pairing-Based Cryptography

Constructing Tower Extensions of Finite Fields for Implementation of Pairing-Based Cryptography Constructing Tower Extensions of Finite Fields for Implementation of Pairing-Based Cryptography Naomi Benger and Michael Scott, 1 School of Computing, Dublin City University, Ireland nbenger@computing.dcu.ie

More information

201-1A5-MT - Mathematics Summer 2015 HOMEWORK 2 Deadline : Sunday, August 30, 2015 at 12 :30.

201-1A5-MT - Mathematics Summer 2015 HOMEWORK 2 Deadline : Sunday, August 30, 2015 at 12 :30. 01-1A5-MT - Mathematics Summer 015 HOMEWORK Deadline : Sunday, August 30, 015 at 1 :30. Instructions : The assignment consists of five questions, each worth 0 points. Only hardcopy submissions of your

More information

Proposed by Jean-Marie De Koninck, Université Laval, Québec, Canada. (a) Let φ denote the Euler φ function, and let γ(n) = p n

Proposed by Jean-Marie De Koninck, Université Laval, Québec, Canada. (a) Let φ denote the Euler φ function, and let γ(n) = p n 10966. Proposed by Jean-Marie De Koninck, Université aval, Québec, Canada. (a) et φ denote the Euler φ function, and let γ(n) = p n p, with γ(1) = 1. Prove that there are exactly six positive integers

More information

Appendix G: Mathematical Induction

Appendix G: Mathematical Induction Appendix G: Mathematical Induction Introduction In this appendix, you will study a form of mathematical proof called mathematical induction. To see the logical need for mathematical induction, take another

More information

Odd prime values of the Ramanujan tau function

Odd prime values of the Ramanujan tau function Ramanujan J DOI 10.1007/s11139-012-9420-8 Odd prime values of the Ramanujan tau function Nik Lygeros Olivier Rozier Received: 22 May 2012 / Accepted: 8 July 2012 Springer Science+Business Media, LLC 2013

More information

Climbing an Infinite Ladder

Climbing an Infinite Ladder Section 5.1 Section Summary Mathematical Induction Examples of Proof by Mathematical Induction Mistaken Proofs by Mathematical Induction Guidelines for Proofs by Mathematical Induction Climbing an Infinite

More information

Solutions of the Diophantine Equation 2 x + p y = z 2 When p is Prime

Solutions of the Diophantine Equation 2 x + p y = z 2 When p is Prime Annals of Pure and Applied Mathematics Vol. 16, No. 2, 2018, 471-477 ISSN: 2279-087X (P), 2279-0888(online) Published on 29 March 2018 www.researchmathsci.org DOI: http://dx.doi.org/10.22457/apam.v16n2a25

More information

PRIMES is in P. Manindra Agrawal. NUS Singapore / IIT Kanpur

PRIMES is in P. Manindra Agrawal. NUS Singapore / IIT Kanpur PRIMES is in P Manindra Agrawal NUS Singapore / IIT Kanpur The Problem Given number n, test if it is prime efficiently. Efficiently = in time a polynomial in number of digits = (log n) c for some constant

More information

Gaussian integers. 1 = a 2 + b 2 = c 2 + d 2.

Gaussian integers. 1 = a 2 + b 2 = c 2 + d 2. Gaussian integers 1 Units in Z[i] An element x = a + bi Z[i], a, b Z is a unit if there exists y = c + di Z[i] such that xy = 1. This implies 1 = x 2 y 2 = (a 2 + b 2 )(c 2 + d 2 ) But a 2, b 2, c 2, d

More information

The knapsack Problem

The knapsack Problem There is a set of n items. The knapsack Problem Item i has value v i Z + and weight w i Z +. We are given K Z + and W Z +. knapsack asks if there exists a subset S {1, 2,..., n} such that i S w i W and

More information

7. Prime Numbers Part VI of PJE

7. Prime Numbers Part VI of PJE 7. Prime Numbers Part VI of PJE 7.1 Definition (p.277) A positive integer n is prime when n > 1 and the only divisors are ±1 and +n. That is D (n) = { n 1 1 n}. Otherwise n > 1 is said to be composite.

More information

Primality testing: then and now

Primality testing: then and now Primality testing: then and now Mathematics Department Colloquium Boise State University, February 20, 2019 Carl Pomerance Dartmouth College (emeritus) University of Georgia (emeritus) In 1801, Carl Friedrich

More information

Homework #2 solutions Due: June 15, 2012

Homework #2 solutions Due: June 15, 2012 All of the following exercises are based on the material in the handout on integers found on the class website. 1. Find d = gcd(475, 385) and express it as a linear combination of 475 and 385. That is

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a k for some integer k. Notation

More information