On this page I will analyse the factorization of 2m - 1. This page is not in chronological order.
On January 12th 2007, I wrote down the factorization of 2m - 1 for m=2...16 because I was interested to see where a factor of the form 2n + 1 would appear. I took the piece of paper to bed with me, to study it, when suddenly I saw structure (conjecture 1, with n equal zero). I got out of bed again and copied the factorization of 2m - 1 for m=17...36 as well. Back in bed, I verified that my conjecture still held and discovered the structure of conjecture 1 with n=1 (and a single data point with n=2). I studied the remaining factors and discovered they all had the form (c m + 1) (conjecture 2). I didn't sleep much that night.
The next day I wrote a program (factorization2.cc) that used conjecture 1, and refined this conjecture in it's current form (still without proof). Then I extended the program to find the factorization of the remaining factors using brute force, which worked extremely fast till m=58 and reached m=82 over night. Studying 211 - 1, I realized that the binomial expansion of (1+1)11 might be relevant and I thought that if I understood why the remaining factors were all of the form (c m + 1) then I might discover a way to find those factors a lot faster. In the next few days I extended the program to use the Cunningham tables in order to have the factors up till 2787 - 1 available, giving me a large control set. I also proved conjecture 1 to hold for n=0 and n=1.
Larger values turned out to be very hard to prove. I downloaded a trial version of Mathematica on January 17th, and started to learn how to use it. After a few days I could calculate the remainder of (xkm - 1) / (xm - 1)n, but only for fixed values of k, m and n. Nevertheless, by using a few prime values for m and very large values for k, I was able to guess a form for the remainders as polynomials in k for n=2...6. This remainder contained a lot of fixed numbers that I couldn't place for several days until finally I plotted the polynomials of k, that I had fit to the data, and found that for constant n they all crossed the same n+1 points. Rearranging things a bit I then formulated the "Pink polynomials" and the next couple of days derived a general form for them.
Having this general form, I was able to prove the correctness of conjecture 1 for n=2...5. A day later I added the last part and finished the proof for arbitrary n. Conjecture 1 was now proved. This was today January 23th, at which point I started to write this document. Anything else will be chronological, adding it as I move forwards.
The actual proof of conjecture 1 is impossible if you do not first know the answer. It took three weeks to find that answer (it is now Februari 17th). It would take too long to show the path followed that lead to the answer. However, I wish to thank Neil Sloane for an important contribution that led to this result, by finding a way to generate a pyramid of integers that I had generated along the way.
Let k, m, n be non-negative integers, x an integer larger than 0, and p prime. If and then .
If x = 1, k = 0 or m = 0 there is nothing to prove. Therefore consider the case where x > 1, k > 0 and m > 0.
Let u = xm, thus u > 1. It won't be used that u is a power of x until at the end of the proof.
Let n be a non-negative integer, and recall that
Consider the equation
which defines the function Rn,k(u),
Using (1), we can work out the sum
This sums over 0 <= j <= n and 0 <= i < k-n.
What we'd like is to sum over i+j. Let r = i+j with a total range of 0 <= r < k. Because the binomial is zero for values of j < 0 and j > n, we can savely replace the sum over j with a sum over r, so that (5a) becomes,
Where the first binomial will be non-zero only when 0 <= r-i <= n and the second binomial will be non-zero only when n <= k-1-i. In otherwords, the only non-zero terms are those when max(0,r-n) <= i <= min(r,k-n-1). If k-n-1 < r but we sum till r anyway, then this is no problem because for values of i > k-n-1, the second binomial is zero anyway. Therefore we can sum over max(0,r-n) <= i <= r. This then suggests we should split the sum into two parts, one where r < n and one where r >= n.
Using the identity [KNUTH, 5.43], we can rewrite the inner sum of the second term as
Now we can rewrite (4), using (2), (5c) and (6) to read
where is the Heaviside step function,
Define for non-negative k and 0 <= i < n, the family of functions
Then we can write Rn,k(u) as
Note that because the sum in (8) is empty for k <= n, we found that
We can rewrite the sum in (8) a bit. Note that, using [KNUTH, 5.43] again,
and thus, if k-n-1 <= i,
Then note that the value of k-1-j in the last binomial factor of the last sum is maximal when j is minimal. This minimal value is k-n, thus the maximum value of the k-1-j is k-1-(k-n) = n-1, rendering this binomial, and therefore the whole sum, zero provided that k-1-j >= 0 for all values of j. The minimal value of k-1-j is obtained for j = i, so that we can conclude that the second sum is zero if k > i.
While if k-n-1 >= i then (10) can be written as
because for all values of j.
Hence, we have
And, with k >= 0, we can write (8) as
Lets try to write Pi,n(k) as a finite sum of powers of k. We can find the highest power by using the finite difference method. This method shows that we can write a sequence as a polynomial of degree n, if the n-th difference gives a constant sequence. As we can learn from this wikipedia reference about the n-th difference operator , there exists a formula that will give us directly the d-th difference:
Because of (9) we known that the degree is at least n. Experimentally fitting polynomials to calculated data gives polynomials of exactly degree n that are correct up till very large k. This motivates us to try d = n and calculate , using (9) and the identity from wikipedia for the last step, to get
If this is to be a constant (with fixed i and n) for larger values of k, then we have proven that Pi,n(k) can actually be written as a polynomial in k of degree n. That is, we have to show that for k >= n, , where is given by the recurrence
As follows directly from (9), . In fact, Pi,n(k) = 1, if i < k <= n, and as follows directly from (15), depends only on the values of Pi,n(r) with k <= r <= k+d, so that , if i < n-d <= n. Moreover, as also follows directly from (9), Pi+1,n+1(k+1) = Pi,n(k), for 0 <= k <= n, because if you add one to k and n then k is still less than or equal n so that (9) still holds, and H[k-1-i] doesn't change. Thus we have the identity , if 0 <= k <= n - d, which translates into , if d > 0 and i >= n-d. Note that d = 0 fails because (9) demands that i < n, thus n > 0, and (16), which we'll need, puts d = n. Combining, we find that
Thus, using (16), and realizing that if d > 0 and i < n - d, we can rewrite (17) as
where as usual, 0 <= i < n and k >= 0.
Actually, if the binomial was correctly defined for negative values, the separation for d = 0 wouldn't have been necessary. According to me, the correct definition of a binomial of two negative values is , and thus, for d = 0, we have .
As an example, consider the following solution to D3,8(d, k).
where k runs from left to right from 0 till 11, and d runs from top to bottom from 0 till n = 8. The top row is therefore P3,8(k) and the first n+1 = 9 values equal H[k-1-i] = H[k-4]. The bottom row is D3,8(8,k) = (-1)n-1-i = (-1)(8-1-3) = 35.
Since the last identity of (19) holds everywhere, it is actually easiest to generate D from the bottom line and the first column. The first column is
If binomial had been defined correctly for negative values, then the special case for d = 0 would not have been necessary. Unfortunately, it is. Therefore things are easier if we redefine D as
This obviously has no influence on the values of D for d > 0, while the top row is simply reduced with 1.
It's not hard to see that this will make life a lot easier. The recurrence rules that generate D1 do not have any special cases.
It's not hard to construct D1i,n(d,k) from this. Each value in the left column gives an independent contribution that adds up to the rest. Consider a single 1 in the left column (with a row of zeroes below it). This would lead to:
from which we clearly see that a 1 in row j contributes to D1i,n(d,k). Moreover, since it's all addition, every additional 1 that is added to the same row in the first column gives the same contribution. Hence, a value x in row j contributes to D1i,n(d,k). "Summing it all up" gives us the result
And thus we found that
which proves that Pi,n(k) can be written as a polynomial in k of degree n. In fact, we can write it as a product of k and a polynomial of degree n-1 because Pi,n(0) = 0 for any i and n. Define
with coefficients c(s,i,n) that later will turn out to be integers (thanks to the wise choice of deviding by n! outside the sum).
Filling this in into (4c) gives
p devides xm-1, thus pn+1 devides the first term. What remains is to prove that pn devides the second sum. As was shown before, k devides and thus the second sum, and pn | k, so we are done.
I ran into these functions, basically by first finding the polynomials for n=1...6 given below and then discovering a structure in them. I named them "Pink" polynomials for an obvious reason. The 'P' stands for Polynomial.
The canonical definition of the Pink polynomial is that they are polynomials in the variable k, of degree n, defined for , where
The polynomials can be constructed in the following "brute force" way,
where the first product takes care of the zeroes between 0 and i, while the sum takes care of the ones between i and n.
If 0 k i, then one of the factors of is zero, and therefore (2) is zero, while if i < k n, then each of the terms of the sum is zero except the one where j = k. Therefore (2) becomes k!/(k-(i+1))! (-1)n+k n!/(k! (n-k)!) (k-(i+1))! (-1)n-k (k-n)! /n! = 1.
Here is a list of all Pink polynomials for n <= 6,
The Pink polynomials have the following properties.
, as follows directly from the definition (1). In other words, they all have k=0 as zero and thus k as factor.
The polynomials can be written as k/n! Q(k) where Q(k) is a polynomial of degree n-1 over . This follows trivially from (2).
Since Q(k) is a polynomial of degree n-1, we should also be able to write this as,
Where the cs are the coefficients of the polynomial.
For , define
Since this function is my own invention, allow me to give a quick overview of some of it's characteristics,
P.S. It turns out that the are known as the unsigned Stirling numbers of the first kind: .
It can be derived that
from which we can conclude that for
Hence, we can rewrite (3) as,
and thus found an expression of the of (4),
Map j --> j+i+1, r --> r+s+i+1-n, l --> l+f then z --> z+j+i+1-n, then h --> h+s-z to get,
We might as well start the sum over f from ((n-1-i)-j)-h because for smaller f, z-h-f > z-((n-1-i)-j) and the subsequent binomial is zero anyway. Map f --> f+((n-1-i)-j)-h to get something that starts at 0 again and we have,
Apparently it makes more sense to number i and s the other way around. Let , . Also inverse j and r, and replace some binomials with .
where the last (actually, non trivial) transformation makes sure that is never called with negative arguments. Nevertheless, now it is apparent that we can simplify this even more by also inverting r (relative to ). This then gives
Filling in k = 0 in (7), and replacing a with -a gives the relationship:
The sum over i of the constant term of each Pink function, , equals n factorial.
where the last step is due to the well-known fact that for .
and therefore k devides , where the ci are integer constants, for any value of (and any n).
New identity used: Integers n,m,a
if a > 0.