Download Prime Numbers in Generalized Pascal Triangles

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Positional notation wikipedia , lookup

John Wallis wikipedia , lookup

Addition wikipedia , lookup

Wiles's proof of Fermat's Last Theorem wikipedia , lookup

History of trigonometry wikipedia , lookup

Factorization wikipedia , lookup

List of prime numbers wikipedia , lookup

Quadratic reciprocity wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Pythagorean theorem wikipedia , lookup

Weber problem wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Acta Technica Jaurinensis
Vol. 1, No. 1, 2008
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,
[email protected]
Széchenyi István University, H-9026, Győr, Egyetem tér 1, [email protected]
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 sth 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
Acta Technica Jaurinensis
Vol. 1, No. 1, 2008
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 nth row of the Pascal triangle with positional addition we
get the nth 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
1
1
1
3
4
5
1
2
3
6
10
1
4
10
1
5
1
1=110, 11=111, 121=112, 1331=113, 14641=114, 161051=115, …
Figure 1: Powers of 11 in the Pascal triangle
This comes directly from the binomial equality
 n  n  n  n1  n  n2
 n  1 n 0
 10   10   10    
10   10  11n

0
1
2
n
1
 
 
 


n
(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 ≤ a0, a1, …, am-1 ≤ 9 be integers. We get the kth element in the nth
row of the a0a1…am-1-based triangle if we multiply the k-mth element in the n-1th row by
am-1, the k-m+1th element in the n-1th row by am-2, …, the kth element in the n-1th row by
a0, 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-1th row does not exist) then we consider this element to be 0.
The indices in the rows and columns run from 0 (Figure 2).
8
1
2
5
7
4 20 53 70 49
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 + cx2)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
Acta Technica Jaurinensis
Vol. 1, No. 1, 2008
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 sth 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 mth column of the nth row
in the generalized Pascal triangles of sth 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 nth row of the a0a1…am-1-based triangle by positional addition
we get the nth power of the number a0a1…am-1.
Example 1.2.4 In the second row of the 257-based triangle
4∙104 + 20∙103 + 53∙102 + 70∙10 + 49 = 66049 = 2572.
Proposition 1.2.5 The elements in the nth row of the general triangle are exactly the
coefficients of the polynomial (a0 + a1x + …+ am-1xm-1)n, where the kth element is the
coefficient of xk.
Example 1.2.6 From the third row of the 257-based triangle (Figure 2)
(2 + 5x + 7x2)3 = 8 + 60x + 234x2 + 545x3 + 819x4 + 735x5 + 343x6.
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 a0a1…am-1 let the weight of
a digit be its distance from the centerline. So w(a0) = -w(am-1), w(a1) = -w(am-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(ai) = w(ai+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 ith power, then we count its weight i-times.
Theorem 1.2.8 The elements in the nth row of the a0a1…am-1-based triangle are exactly
such sums of the coefficients of the polynomial (a0x0 + a1x1 + …+ am-1xm-1)n, in which
the weights of the parts are identical.
111
Acta Technica Jaurinensis
Vol. 1, No. 1, 2008
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 11a2a3… 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
13  2ac  b 2 and 13  6abc  b 3 ,
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 nth 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 113based 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
1114
1114
1112
1112
Position
1065, 1065
815, 1630
846, 1692
847, 847
Digits
692
685
584
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
Acta Technica Jaurinensis
Vol. 1, No. 1, 2008
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 1750th row (Tabular 2).
Position
1048, 1048
1228, 1228
1321, 1321
1572, 1572
1614, 1614
1640, 1640
1726, 1726
Prime factor digits
603
705
746
907
929
948
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
Acta Technica Jaurinensis
Vol. 1, No. 1, 2008
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
(mod p).
ap  a
In particular, if p does not divide a then
(mod p).
a p1  a
Unfortunately, there are such n composite integers for that the congruence
(mod n)
a n1  a
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
Acta Technica Jaurinensis
Vol. 1, No. 1, 2008
1. m > | G | q | for any prime q, where q | n and q < n ,
2. xm = 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
x3 + 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)  K2 which satisfy the
equation
y2 = x3 + ax + b.
Then we say that E(K) is an elliptic curve over K.
Note that if 4a3 + 27b ≠ 0 then x3 + 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
(x1, y1) + (x2, y2) = (x3, -y3),
if (x2, y2) ≠ (x1, -y1). 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 (x2, y2) = (x1, -y1), 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 (x1, y1), (x2, y2) are rational points than so is (x3, -y3).
Now, we can define the appropriate group:
Definition 2.2.3 For a given elliptic curve
y2 = x3 + ax + b,
where 4a3 + 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, En 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  En for which
m
m  P  O and  P  O
q
115
Acta Technica Jaurinensis
Vol. 1, No. 1, 2008
are valid for every prime factor q of s. Then for every prime divisor p of n the
congruence
| En |  0
(mod s)
is true, and if
s

4

2
n 1 ,
(3)
then n is a prime number.
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 En  random elliptic curve over over Z/nZ
2 m  | En |
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


2
6 if s  4 n  1
7
then goto 1
8 P  random point from En
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]
[2]
116
Bondarenko, B. A., Pascal Triangles and Pyramids, Their Fractals, Graphs and
Applications, The Fibonacci Association, Santa Clara, 1993, 1-56.
Bressoud, D. M., Factorization and Primality Testing, Springer-Verlag, New
York, 1989, 1-227.
Acta Technica Jaurinensis
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
Vol. 1, No. 1, 2008
Farkas, G., Kátai, I., Informatical Algorithms (Number Theory) (in Hungarian),
ELTE Eötvös Kiadó, Budapest, 2005, 1054-1114.
Freund, J. E., Restricted Occupancy Theory - A Generalization of Pascal's
Triangle, Amer. Math. Monthly, 63 (1956), 20-27.
Járai, A., Computatitonal Number Theory (in Hungarian), ELTE IK, Budapest,
1998, 1-60. http://compalg.inf.elte.hu/~ajarai/konyvek.html
Kallós, G., Generalizations of Pascal’s Triangle (in Hungarian), MSc thesis,
ELTE, Budapest, 1993, 1-63.
Kallós, G., The Generalization of Pascal's Triangle from Algebraic Point of
View, Acta Acad. Paed. Agriensis, XXIV, (1997), 11-18.
Morain, F., The ECPP homepage,
http://www.lix.polytechnique.fr/~morain/Prgms/ecpp.english.html
Morton, R. L., Pascal's Triangle and Powers of 11, Math. Teacher, 57 (1964),
392-394.
Sloane, N. J. A., On-line Encyclopedia of Integer Sequences,
http://www.research.att.com/~njas/sequences/
117
Acta Technica Jaurinensis
118
Vol. 1, No. 1, 2008