
Who knew there was so much to say about the product of consecutive integers? This page answers the following questions:
The formula for finding the product of any odd number of consecutive integers follows the pattern of coefficients in Sloane's A008955.
If the number of numbers is 2k+1, where k=0,1,2,..., then we can define a function P_{odd}(k,n) as the product of 2k+1 numbers in which the "middle" number is n. That is P_{odd}(k,n)=(nk)(nk+1)...(n+k)
Notice that P_{odd}(k+1,n) = (n^{2}k^{2}) P_{odd}(k,n), which gives us a recurrence relation that lets us find the coefficients of each polynomial:
P_{odd}(0,n) = (n) = n
P_{odd}(1,n) =
(n1)(n)(n+1) = n^{3} n
P_{odd}(2,n) =
(n2)(n1)...(n+2) = n^{5} 5n^{3} +4n
P_{odd}(3,n) =
(n3)(n2)...(n+3) = n^{7} 14n^{5} +49n^{3}
36n
P_{odd}(4,n) =
(n4)(n3)...(n+4) = n^{9} 30n^{7} +273n^{5}
820n^{3} +576n
P_{odd}(5,n) =
(n5)(n4)...(n+5) = n^{11} 55n^{9} +1023n^{7}
7645n^{5} +21076n^{3} 14400n
P_{odd}(6,n) =
(n6)(n5)...(n+6) = n^{13} 91n^{11} +3003n^{9}
44473n^{7} +296296n^{5} 773136n^{3} +518400n
P_{odd}(7,n) =
(n7)(n6)...(n+7) = n^{15}... well, you get the idea!
The formula for finding the product of any even number of consecutive integers follows the pattern of coefficients in Sloane's A008956.
If the number of numbers is 2k, where k=0,1,2,..., then we can define a function P_{even}(k,n) as the product of 2k numbers in which the sum of the two "middle" numbers is n. Notice that this sum is always odd. Each of the consecutive numbers can be represented as (n+m)/2, where m is an odd number that ranges from 2k+1 to 2k1. That is,
P_{even}(k,n)=(n2k+1)/2 (n2k+3)/2 ...
(n+2k1)/2, or
P_{even}(k,n)=(n2k+1) (n2k+3) ... (n+2k1)/2^{2k}
Notice that P_{even}(k+1,n) = (n^{2}(2k1)^{2}) P_{even}(k,n), which gives us a recurrence relation that lets us find the coefficients of each polynomial:
P_{even}(0,n) = (1)/2^{0} = 1
P_{even}(1,n) =
(n1)(n+1)/2^{2} = (n^{2} 1)/4
P_{even}(2,n) =
(n3)(n1)(n+1)(n+3)/2^{4} = (n^{4} 10n^{2}
+9)/16
P_{even}(3,n) =
(n5)(n3)...(n+5)/2^{6} = (n^{6} 35n^{4}
+259n^{2} 225)/64
P_{even}(4,n) =
(n7)(n5)...(n+7)/2^{8} = (n^{8} 84n^{6}
+1974n^{4} 12916n^{2} +11025)/256
P_{even}(5,n) =
(n9)(n7)...(n+9)/2^{10} = (n^{10} 165n^{8}
+8778n^{6} 172810n^{4} +1057221n^{2} 893025)/1024
P_{even}(6,n) =
(n11)(n9)...(n+11)/2^{12} = (n^{12} 286n^{10}
+28743n^{8} 1234948n^{6} +21967231n^{4}
128816766n^{2} +108056025)/4096
P_{even}(7,n) =
(n13)(n11)...(n+13)/2^{14} = (n^{14} 455n^{12}
+77077n^{10} 6092515n^{8} +230673443n^{6}
3841278805n^{4} +21878089479n^{2} 18261468225)/16384
Of course, the product of integers from k+1 to n is n!/k!. Toward the end of Mathworld's article in Stirling's Approximation to n!, this statement appears:
Gosper has noted that a better approximation to n! (i.e., one which approximates the terms in Stirling's series instead of truncating them) is given by
n! ≈ sqrt((2n+1/3)π) n^{n} e^{n}
Using this approximation, n!/k! is given by
n!/k! ≈ (n/e)^{nk} (n/k)^{k} sqrt(6n+1) / sqrt(6k+1)
This form is useful for computation, especially when k is almost as large as n, because it avoids very large or very small numbers in intermediate results.
Proof 1: Consider the number of nelement sets of an (n+m) element
set. This is C(n+m,n), which is an integer, and
C(n+m,n) = (m+1)(m+2)(m+3)...(m+n) / n!. The numerator is the product of n
consecutive integers, and the denominator is n!, proving that the product of n
consecutive integers is divisible by n!.
Proof 2: Consider the largest power of each prime factor of the product of consecutive integers. Let P be the product,
P = (m+1)(m+2)...(m+n) = (m+n)!/m!
For any given positive integer n and prime p, define the function E(n,p) = e such that p^{e} is the largest power of p that divides n!. This is the number of numbers from 1 to n divisible by p plus the number of numbers divisible by p^{2} plus the number of numbers divisible by p^{3}, etc.
E(n,p) = floor[n/p] + floor[n/p^{2}] + floor[n/p^{3}] + ...
Using this definition with the product, P=(m+n)!/m!, we see that
E(m+n,p)E(m,p) = floor[(m+n)/p]  floor[m/p] + floor[(m+n)/p^{2}]  floor[m/p^{2}] + floor[(m+n)/p^{3}]  floor[m/p^{3}] + ...
which is at least as large as E(n,p) for any given m, n and p, because for any real numbers, a and b, floor[a+b] ≥ floor[a] + floor[b]
A note about products of negative numbers
The two proofs, above work for products of n positive integers, but the statement is also true when the product includes negative integers or zero. There are two cases that need to be considered:
Case 1: the product of negative numbers. This is equal to plus or minus the product of the corresponding positive numbers, and so it is divisible by n!.
Case 2: the product of numbers, some of which are negative, and some of which are not negative. In this case, one of the numbers must be zero, so the product is zero, and zero is divisible by all n!
Proof that floor[a+b] ≥ floor[a] + floor[b]
It may seem obvious, but it's a little tricky, so I've included this little proof:
a ≥ floor[a], and b ≥ floor[b], so
a+b ≥ floor[a]+floor[b].
floor is a nondecreasing function, which means if x ≥ y, then floor[x] ≥ floor[y], so we can take the "floor" of both sides of this inequality:
floor[a+b] ≥ floor[floor[a]+floor[b]] = floor[a]+floor[b]
Puzzle: A TwoPlayer Game proves some interesting facts about complementary Beatty sequences using the floor function.
The webmaster and author of this Math Help site is Graeme McRae.