# 53 arithmetic/consecutive.product.p

Prove that the product of three or more consecutive positive integers cannot
be a perfect square.

arithmetic/consecutive.product.s

Three consecutive numbers:
If a and b are relatively prime, and ab is a square,
then a and b are squares. (This is left as an exercise.)

Suppose (n - 1)n(n + 1) = k^2, where n > 1.
Then n(n^2 - 1) = k^2. But n and (n^2 - 1) are relatively prime.
Therefore n^2 - 1 is a perfect square, which is a contradiction.

Four consecutive numbers:
n(n + 1)(n + 2)(n + 3) = (n^2 + 3n + 1)^2 - 1

Five consecutive numbers:
Assume the product is a integer square, call it m.

The prime factorization of m must have even numbers of each prime factor.

For each prime factor, p, of m, p >= 5, p^2k must divide one of the
consecutive naturals in the product. (Otherwise, the difference between two
of the naturals in the product would be a positive multiple of a prime >= 5.
But in this problem, the greatest difference is 4.) So we need only consider
the primes 2 and 3.

Each of the consecutive naturals is one of:
1) a perfect square
2) 2 times a perfect square
3) 3 times a perfect square
4) 6 times a perfect square.

By the shoe box principle, two of the five consecutive numbers must fall into
the same category.

If there are two perfect squares, then their difference being less than five
limits their values to be 1 and 4. (0 is not a natural number, so 0 and 1
and 0 and 4 cannot be the perfect squares.) But 1*2*3*4*5=120!=x*x where x
is an integer.

If there are two numbers that are 2 times a perfect square, then their
difference being less than five implies that the perfect squares (which are
multiplied by 2) are less than 3 apart, and no two natural squares differ by
only 1 or 2.

A similar argument holds for two numbers which are 3 times a perfect square.

We cannot have the case that two of the 5 consecutive numbers are multiples
(much less square multiples) of 6, since their difference would be >= 6, and
our span of five consecutive numbers is only 4.

Therefore the assumption that m is a perfect square does not hold.

QED.

In general the equation:

y^2 = x(x+1)(x+2)...(x+n), n > 3

has only the solution corresponding to y = 0.

This is a theorem of Rigge [O. Rigge, ``Uber ein diophantisches Problem'',
IX Skan. Math. Kong. Helsingfors (1938)] and Erdos [P. Erdos, ``Note on
products of consecutive integers,'' J. London Math. Soc. #14 (1939),
pages 194-198].

A proof can be found on page 276 of [L. Mordell, ``Diophantine

arithmetic/consecutive.sums.p

Find all series of consecutive positive integers whose sum is exactly 10,000.

arithmetic/consecutive.sums.s

Generalize to find X (and I) such that
(X + X+1 + X+2 + ... + X+I) = T
for any integer T.

You are asking for all (X,I) s.t. (2X+I)(I+1) = 2T. The problem is
(very) slightly easier if we don't restrict X to being positive, so
we'll solve this first.

Note that 2X+I and I+1 must have different parities, so the answer
to the relaxed question is N = 2*(o_1+1)*(o_2+1)*...*(o_n+1), where
2T = 2^o_0*3^o_1*...*p_n^o_n (the prime factorization); this is easily
seen to be the number of ways we can break 2T up into two positive
factors of differing parity (with order).

In particular, 20000 = 2^5*5^4, hence there are 2*(4+1) = 10 solutions
for T = 10000. These are (2X+I,I+1):

```(32*1,5^4)   (32*5,5^3)   (32*5^2,5^2)   (32*5^3,5)   (32*5^4,1)
(5^4,32*1)   (5^3,32*5)   (5^2,32*5^2)   (5,32*5^3)   (1,32*5^4)
```

And they give rise to the solutions (X,I):

```(-296,624)   (28,124)   (388,24)   (1998,4)     (10000,0)
(297,31)     (-27,179)  (-387,799) (-1997,3999) (-9999,19999)
```

If you require that X>0 note that this is true iff 2X+I > I+1 and
hence the number of solutions to this problem is N/2 (due to the
symmetry of the above ordered pairs).

Continue to: