Prime Numbers in Generalized Pascal Triangles

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

Introduction to Number Theory

ECEN 5022 Cryptography

A Few Primality Testing Algorithms

FERMAT S TEST KEITH CONRAD

Table of Contents. 2013, Pearson Education, Inc.

PROBLEMS ON CONGRUENCES AND DIVISIBILITY

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

6: Polynomials and Polynomial Functions

Unit 2-1: Factoring and Solving Quadratics. 0. I can add, subtract and multiply polynomial expressions

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

Math 5330 Spring Notes Congruences

UNIQUE-PERIOD PRIMES. Chris K. Caldwell 5856 Harry Daniels Road Rives, Tennessee

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

Algebra. Table of Contents

THE SOLOVAY STRASSEN TEST

CK-12 Middle School Math Grade 8

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

Elliptic curves: Theory and Applications. Day 3: Counting points.

EULER S THEOREM KEITH CONRAD

Generalized Lucas Sequences Part II

A Guide to Arithmetic

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

Mathathon Round 1 (2 points each)

MATH 361: NUMBER THEORY FOURTH LECTURE

Elliptic Curves Spring 2013 Lecture #12 03/19/2013

10 Problem 1. The following assertions may be true or false, depending on the choice of the integers a, b 0. a "

THE MILLER RABIN TEST

Unit 1 Vocabulary. A function that contains 1 or more or terms. The variables may be to any non-negative power.

Part II. Number Theory. Year

Rational Numbers and Exponents

Math 109 HW 9 Solutions

Cryptography. Number Theory with AN INTRODUCTION TO. James S. Kraft. Lawrence C. Washington. CRC Press

CP Algebra 2. Unit 2-1 Factoring and Solving Quadratics

Euler s, Fermat s and Wilson s Theorems

Solutions to Practice Final

Elementary Number Theory

1. multiplication is commutative and associative;

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Math 3 Variable Manipulation Part 3 Polynomials A

Contents. Preface to the First Edition. Preface to the Second Edition. Preface to the Third Edition

ORDERS OF UNITS IN MODULAR ARITHMETIC

Florida Math Curriculum (433 topics)

Part IA Numbers and Sets

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

IRREDUCIBILITY TESTS IN F p [T ]

198 VOLUME 46/47, NUMBER 3

Intermediate Math Circles February 14, 2018 Contest Prep: Number Theory

Prentice Hall CME Project, Algebra

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

Fibonacci Pseudoprimes and their Place in Primality Testing

Oleg Eterevsky St. Petersburg State University, Bibliotechnaya Sq. 2, St. Petersburg, , Russia

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

Objective Type Questions

4 Number Theory and Cryptography

Math 75 Mini-Mod Due Dates Spring 2016

On Arithmetic Properties of Bell Numbers, Delannoy Numbers and Schröder Numbers

3 The fundamentals: Algorithms, the integers, and matrices

MA094 Part 2 - Beginning Algebra Summary

Part 2 - Beginning Algebra Summary

Chapter R - Review of Basic Algebraic Concepts (26 topics, no due date)

GEOMETRY OF BINOMIAL COEFFICIENTS. STEPHEN WOLFRAM The Institute jor Advanced Study, Princeton NJ 08540

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

Numbers, Groups and Cryptography. Gordan Savin

F. T. HOWARD AND CURTIS COOPER

CHAPTER 1 POLYNOMIALS

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

UNCORRECTED SAMPLE PAGES. Extension 1. The binomial expansion and. Digital resources for this chapter

Homework #2 solutions Due: June 15, 2012

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

correlated to the Utah 2007 Secondary Math Core Curriculum Algebra 1

CHMC: Finite Fields 9/23/17

Notes on Continued Fractions for Math 4400

WXML Final Report: Primality of Polynomials

A PERIODIC APPROACH TO PLANE PARTITION CONGRUENCES

Multiplying Products of Prime Powers

The New Book of Prime Number Records

Selected Chapters from Number Theory and Algebra

Extend Fermats Small Theorem to r p 1 mod p 3 for divisors r of p ± 1

1: Please compute the Jacobi symbol ( 99

7. Prime Numbers Part VI of PJE

The RSA cryptosystem and primality tests

A characterization of the identity function

Algorithms (II) Yu Yu. Shanghai Jiaotong University

ASSIGNMENT Use mathematical induction to show that the sum of the cubes of three consecutive non-negative integers is divisible by 9.

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 =

Number Theory, Algebra and Analysis. William Yslas Vélez Department of Mathematics University of Arizona

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number

1 Take-home exam and final exam study guide

Pseudoprimes and Carmichael Numbers

LEGENDRE S THEOREM, LEGRANGE S DESCENT

Defining Valuation Rings

Basic Math. Curriculum (358 topics additional topics)

6.5 Elliptic Curves Over the Rational Numbers

On New Identities For Mersenne Numbers

arxiv: v1 [math.nt] 29 Jul 2014

D-MATH Algebra II FS18 Prof. Marc Burger. Solution 26. Cyclotomic extensions.

Transcription:

Prime Numbers in Generalized Pascal Triangles G. Farkas, G. Kallós Eötvös Loránd University, H-1117, Budapest, Pázmány Péter sétány 1/C, farkasg@compalg.inf.elte.hu Széchenyi István University, H-9026, Győr, Egyetem tér 1, kallos@sze.hu Abstract: In this paper we generalize the Pascal triangle and examine the connections among the generalized triangles and powering integers respectively polynomials. We emphasize connections with the binomial and multinomial theorems, and we present some computational results in topics of prime numbers and prime factorization. Some prime numbers (candidates) connected to the generalized Pascal triangle are presented. We describe a very efficient primality proving algorithm called ECPP (Elliptic Curve Primality Proving) and for one of the candidates an exact primality proof is given. Since this prime number has more than 1000 digits, it is a so-called titanic prime. Keywords: Pascal triangle, Generalized binomial coefficient, Primality testing, ECPP 1. Generalized Pascal Triangles 1.1 Introduction The interesting and really romantic Pascal triangle has a number of generalizations. We can construct the generalized Pascal triangles of s th order (or kind s), from the generalized binomial coefficients of order s. This idea was first published in 1956 by J. E. Freund [4]. The so-called Pascal pyramid is constructed from trinomial coefficients, which occur in the expansions (x + y + z) n (first mentioned by E. B. Rosenthal, 1960, [1]). Each of the outer faces of the pyramid are Pascal triangles. We can extend this idea to the multidimensional case, so Pascal hyperpyramids can be constructed from multinomial coefficients [1]. 109

Our generalization 1 is based on the well-known fact (see e.g. the paper of R. L. Morton from 1964, [9]) that from the n th row of the Pascal triangle with positional addition we get the n th power of 11 (Figure 1), where n is a non-negative integer, and the indices in the rows and columns run from 0. 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1=11 0, 11=11 1, 121=11 2, 1331=11 3, 14641=11 4, 161051=11 5, Figure 1: Powers of 11 in the Pascal triangle This comes directly from the binomial equality n 10 0 n n 10 1 n 1 n 10 2 n 2 n n 1 n n 1 0 n 10 10 11 (1) 1.2. Generalization Let us construct triangles, in which the powers of other numbers appear. To achieve this, let us consider the Pascal triangle as the 11-based triangle, and take the following definition. Definition 1.2.1 Let 0 a 0, a 1,, a m-1 9 be integers. We get the k th element in the n th row of the a 0 a 1 a m-1 -based triangle if we multiply the k-m th element in the n-1 th row by a m-1, the k-m+1 th element in the n-1 th row by a m-2,, the k th element in the n-1 th row by a 0, and add the products. If for some index i we have k m + i < 0 or k m + i > n(m - 1) (i.e., an element in the n-1 th row does not exist) then we consider this element to be 0. The indices in the rows and columns run from 0 (Figure 2). 1 2 5 7 4 20 53 70 49 8 60 234 545 819 735 343 Figure 2: The 257-based triangle 1 The main idea was presented by the second author in 1993, and later in a subsequent paper in 1997 ([6], [7]). Although the construction of triangles of coefficients in expansions of (a + bx) n and (a + bx + cx 2 ) n have already been mentioned by few other authors in the last years (see e.g. [10]), systematic analysis was published first only in [6] and [7]. 110

Remark 1.2.2 Triangles with base-number 11 1 (s pieces of 1 digits) have already been known for decades as generalized Pascal triangles of s th order [1]. However, they were introduced using a combinatorial approach, by the generalization of the binomial coefficients [4]. The generalized binomial coefficient n (2) m s is the number of different ways of distributing m objects among n cells where each cell may contain at most s-1 objects [1]. This is the element in the m th column of the n th row in the generalized Pascal triangles of s th order. For s = 2 we get the "normal" binomial coefficients and the Pascal triangle. Now we summarize the main results about the general triangles. The proofs are here omitted. Details can be found in [7]. Theorem 1.2.3 From the n th row of the a 0 a 1 a m-1 -based triangle by positional addition we get the n th power of the number a 0 a 1 a m-1. Example 1.2.4 In the second row of the 257-based triangle 4 10 4 + 20 10 3 + 53 10 2 + 70 10 + 49 = 66049 = 257 2. Proposition 1.2.5 The elements in the n th row of the general triangle are exactly the coefficients of the polynomial (a 0 + a 1 x + + a m-1 x m-1 ) n, where the k th element is the coefficient of x k. Example 1.2.6 From the third row of the 257-based triangle (Figure 2) (2 + 5x + 7x 2 ) 3 = 8 + 60x + 234x 2 + 545x 3 + 819x 4 + 735x 5 + 343x 6. These results show that we have the "right" to call the new triangles as generalized Pascal triangles, since their general properties are very similar to those of the Pascal triangle. With deeper analysis we are able to discover a nice connection of the general triangle with the multinomial (sometimes referred as the polynomial) theorem. Definition 1.2.7 For the digits of the base-number number a 0 a 1 a m-1 let the weight of a digit be its distance from the centerline. So w(a 0 ) = -w(a m-1 ), w(a 1 ) = -w(a m-2 ),. If the base number is odd, then w(a (m-1)/2 ) = 0. Let the unit of the weights be the distance of two neighboring elements in the triangle, i.e., w(a i ) = w(a i+1 ) + 1. As the elements of the triangle are sums, consider the parts of them. For such an expression let the weight of the part be the sum of the weights of its digits. If a digit is on the i th power, then we count its weight i-times. Theorem 1.2.8 The elements in the n th row of the a 0 a 1 a m-1 -based triangle are exactly such sums of the coefficients of the polynomial (a 0 x 0 + a 1 x 1 + + a m-1 x m-1 ) n, in which the weights of the parts are identical. 111

1.3. Investigations We can investigate a lot of interesting properties of general triangles. E.g. we can generalize further properties of the Pascal triangle, we can analyze divisibility results and modulo n coloring and calculate fractal dimensions. Some of these topics are partly covered in [6] and in [7]. Here we present a summary about the topics of prime numbers and factorizations in general triangles. 1.3.1. Prime numbers It is a trivial result that in triangles with base 11a 2 a 3 we get all of the prime numbers in the first position of the rows (similarly, as in the Pascal triangle). For general triangles it follows from the multinomial theorem and our Theorem 1.2.8 that we can find prime numbers in given "directions" (details in [6]). E.g. in the abc-based triangles the middle position is interesting. Investigations on computer show that small primes are relatively common; however large primes are very rare. We can find all of the small primes up to 101 in the first 3 rows of the abc-based triangles in positions (2, 2) and (3, 3), except for 47, which occur first in the third row of the 1231-based triangle. The most common small prime is 13, which occur in triangles 112, 116, 132, 211, 213, 231, 312 and 611 in positions (2, 2) and (3, 3), by solving equations 2 3 13 2ac b and 13 6abc b, for a, b and c. R. C. Bollinger proved for triangles with base 11 1 (generalized Pascal triangle of order p) that for large n, "almost all" coefficients in the n th row are divisible by p (details in [1]). It is a conjecture that we have a similar result for our general triangles (e.g. in the 112-based triangle "almost all" coefficients are divisible by 5 and 7, in the 113- based triangle "almost all" coefficients are divisible by 7 and 11). Thus, we have only very little chance to find a large prime number in an arbitrary triangle. With a computer program e.g. in triangles with base numbers 1112-1119 we can find 4 primes (candidates) more than 500 decimal digits checking the first 1100 rows (Tabular 1). Base Position Digits 1114 1065, 1065 692 1114 815, 1630 685 1112 846, 1692 584 1112 847, 847 506 Table 1: Primes (candidates) in triangles with base numbers 1112-1119 1.3.2. Factorizations Analyzing factorizations of numbers in general triangles on a computer, we find usually a few small factors some of which are repetitive, and a lot of composite parts, which are only possible to be decomposed with a large effort. Pure large prime factors are very rare (in 1 percent of the elements, or even less). 112

E.g. in the 112-based triangle we have found 7 pure large prime factors (candidates) more than 600 digits in the middle positions up to the 1750 th row (Tabular 2). Position Prime factor digits 1048, 1048 603 1228, 1228 705 1321, 1321 746 1572, 1572 907 1614, 1614 929 1640, 1640 948 1726, 1726 1002 Table 2: Pure large prime factors (candidates) in the 112-based triangle The factorization of element (1726, 1726) is as follows: (5)*(7)^2*(8955571088204928611180095814364809367895943433567019510135084 1017922925214881835896168871504402070664406291283573547202439538782851 8328191758611643262141347758241155262347682913803460965961514988185975 3020778946392306674978486443783130425313570270650809524027414375654500 2488438721509818211689450900216726900017993752602103063643631819328962 0122518964080075755853093249382940000261715099189239343994970482600279 2152452975641055194384198099852638316551763818693739175792137424955030 2149405155103617012033518589890211596245293551248905084156933213742619 3638844058108665653535692175830088668514046562966205646177288855678457 3031360476713923493493327100482024095610486559497478613889769558677164 6383871596006237690780179494024194357359883388775959577703483864919899 2203108786137388870997953931786755545641248144244626273116134346981385 4366283507488701741529698688498571473902939137014704173796156416002715 5528919099747269708106697748696029062387015171102652742197844486849009 9136225576107430832164984598929) Here the last number is the 1002-digit prime candidate. Our goal was to prove the prime property of this candidate. The importance of this proof was to overcome the 1000 decimal-digit limit, since after S. Yates we call these primes titanic ones. He started to collect the list of such numbers and their founders in the mid 80s. 2. Primality Testing 2.1. Introduction As a matter of fact, "primality test" is a procedure for deciding whether a positive integer n is prime or not. Finding an efficient algorithm for solving the above mentioned problem has been occupying the attention of lots of famous mathematicians for hundreds of years. 113

We have to distinguish two kinds of primality test methods. An exact primality test gives one of the following two answers: "n is a prime" or "n is a composite number". If we use a probabilistic primality test, the first answer is "n may be a prime". The running time of the probabilistic test is shorter, but we could not be hundred percent sure of the prime property of n. Although the exact tests are exclusively suited for primality proving, the probabilistic tests are very useful for producing so-called "candidates (for primality)". The following statement published by Euler, known as Fermat's Little Theorem, was the basic idea of the probabilistic primality tests: Theorem 2.1.1 Let p be a prime and a an arbitrary integer. Then a p a (mod p). In particular, if p does not divide a then a p 1 a (mod p). Unfortunately, there are such n composite integers for that the congruence a n 1 a (mod n) is valid. In general if n is an odd composite number which is relatively prime to a and satisfies the above congruence, then n is a pseudoprime for the base a. We speak about a Carmichael number, if n is a pseudoprime for all bases to which they are relatively prime. Luckily, Carmichael numbers are less than 2 500 up to 25 000 000 000. 2.2. Elliptic Curve Primality Proving (ECPP) Due to the total lack of space we give just a schematic description of the oldest and one of the newest exact primality proving methods (see the number-theoretical details in [2] and additional information about the algorithms and their implementation in [3] and [5]). The following routine, which checks the divisors of n from 2 to n, was the first algorithm for primality testing: 1 for d 2 to n 2 do if d n 3 then return COMPOSITE 4 return PRIME Let us observe that with this algorithm it takes a very long time to carry out the primality test for large numbers n. These days the most efficient exact primality testing algorithms are based on the theory of elliptic curves. The basic idea rises from the following theorem which is well-known in Group Theory: Theorem 2.2.1 Let n be a candidate for primality and assume that we have a group (mod n), denoted by G. Let G d be the restricted group (mod d) and e the identity in G. If we can find an x G and an integer m satisfying the following conditions, then n is a prime: 114

1. m > G q for any prime q, where q n and q < n, 2. x m = e, 3. For each prime p dividing m, some coordinate of x (m/p) e is relatively prime to n. Note that for an integer n and a positive integer m the expression (m/p) is the Jacobi symbol which is the generalization of Legendre symbol to composite numbers. The appropriate group can be constructed with elliptic curves. Let K be one of the fields Q, R, C and Fq, where q is a prime number and Fq is the appropriate finite field. Let us consider the polynomial x 3 + ax + b K[x] from which we can get the base set of the group in the following way: Definition 2.2.2 Let E(K) be the set of those points (x, y) K 2 which satisfy the equation y 2 = x 3 + ax + b. Then we say that E(K) is an elliptic curve over K. Note that if 4a 3 + 27b 0 then x 3 + ax + b has three distinct roots. Naturally, we need an identity element in E(K), therefore, let us complete it with the point infinitely far north denoted by O. To get a group we need to define a binary operation on E(K) which is associative and for each element a E(K) there exists an inverse element -a such that a + (-a) = (-a) + a = O. To do this, we can make use of such an extraordinary property of the elliptic curves that if a non-vertical line intersects it at two points, then it will also have a third point of intersection. It can be proved that this third point can be calculated in a similar way. Using additive notation we define the + operation by (x 1, y 1 ) + (x 2, y 2 ) = (x 3, -y 3 ), if (x 2, y 2 ) (x 1, -y 1 ). Thus, the sum of two points is not the third intersection point, but the reflection across the x-axis of it which is still on the same elliptic curve. Let us observe that if (x 2, y 2 ) = (x 1, -y 1 ), these two points define a vertical line which has no third intersection point, thus in this case (x, y) + (x, -y) = (x, -y) + (x, y) = O. It can be proved further that if (x 1, y 1 ), (x 2, y 2 ) are rational points than so is (x 3, -y 3 ). Now, we can define the appropriate group: Definition 2.2.3 For a given elliptic curve y 2 = x 3 + ax + b, where 4a 3 + 27b 0, let E denote the group of rational points on the curve together with the identity O with the binary operation +. We present the assertion on which the elliptic curve primality tests are based. Theorem 2.2.4 Let n N, (6, n) =1, E n is an elliptic curve over Z/nZ and m, s such integers for that s m. Let us assume that there exists such a point P E n for which m m P O and P O q 115

are valid for every prime factor q of s. Then for every prime divisor p of n the congruence E n 0 (mod s) is true, and if (3) then n is a prime number. s 4 n 1 2, Here m and m/q are integers, where c P means repeated addition c-times for point P. Now we can give a schematic pseudocode of ECPP using the notation of the previous theorem. ECPP(n) 1 E n random elliptic curve over over Z/nZ 2 m E n 3 if m = q s, where s is probably prime and the factorization of q is known 4 then goto 8 5 else goto 1 4 6 if s n 1 2 7 then goto 1 8 P random point from E n 9 if q P is not defined 10 then return COMPOSITE 11 if (m/q) P = O 12 then goto 8 13 if m P O 14 then return COMPOSITE 15 while we are not sure 16 do ECPP(s) During the application of the algorithm we get a strictly monotone decreasing series of numbers s, the first of which is n itself. Practically this algorithm terminates either in case of a composite n, or in a case when s is a small prime, which can be proved by easy effort. The effective proof for our 1002-digit candidate was carried out by the ECPP package version 6.4.5 developed by F. Morain. This is a free program, which can be found on page [8]. The running time was 36 596.26 sec on a processor AMD Athlon 64. References [1] Bondarenko, B. A., Pascal Triangles and Pyramids, Their Fractals, Graphs and Applications, The Fibonacci Association, Santa Clara, 1993, 1-56. [2] Bressoud, D. M., Factorization and Primality Testing, Springer-Verlag, New York, 1989, 1-227. 116

[3] Farkas, G., Kátai, I., Informatical Algorithms (Number Theory) (in Hungarian), ELTE Eötvös Kiadó, Budapest, 2005, 1054-1114. [4] Freund, J. E., Restricted Occupancy Theory - A Generalization of Pascal's Triangle, Amer. Math. Monthly, 63 (1956), 20-27. [5] Járai, A., Computatitonal Number Theory (in Hungarian), ELTE IK, Budapest, 1998, 1-60. http://compalg.inf.elte.hu/~ajarai/konyvek.html [6] Kallós, G., Generalizations of Pascal s Triangle (in Hungarian), MSc thesis, ELTE, Budapest, 1993, 1-63. [7] Kallós, G., The Generalization of Pascal's Triangle from Algebraic Point of View, Acta Acad. Paed. Agriensis, XXIV, (1997), 11-18. [8] Morain, F., The ECPP homepage, http://www.lix.polytechnique.fr/~morain/prgms/ecpp.english.html [9] Morton, R. L., Pascal's Triangle and Powers of 11, Math. Teacher, 57 (1964), 392-394. [10] Sloane, N. J. A., On-line Encyclopedia of Integer Sequences, http://www.research.att.com/~njas/sequences/ 117

118