Maths Olympiad Prep

Library / Olimpiadi di Matematica /27 of 32

Olimpiadi di Matematica

Number theory Difficulty 6.2 National Olympiad Prove it Italy

Problem:

A positive integer is called triangular if it can be written in the form n(n+1)2\frac{n(n+1)}{2} for some positive integer nn. How many pairs (a,b)(a, b) of triangular numbers are there such that b−a=2007b-a=2007? (Recall that 223 is a prime number.)

Solution

Solution:

There are 6 pairs of triangular numbers that satisfy the required condition. The problem is equivalent to finding the pairs of positive integers (n,m)(n, m) such that
n(n+1)2−m(m+1)2=2007. \frac{n(n+1)}{2}-\frac{m(m+1)}{2}=2007.
Indeed, since different values of nn determine different values of n(n+1)2\frac{n(n+1)}{2}, determining the triangular numbers aa and bb is equivalent to determining the values of nn and mm that generate them.
Clearing denominators and factoring, the equation becomes
(n−m)(n+m+1)=2⋅2007=2⋅32⋅223. (n-m)(n+m+1)=2 \cdot 2007=2 \cdot 3^{2} \cdot 223.
Since n>0,m>0n>0, m>0 and hence n+m+1>0n+m+1>0, n−mn-m must also be positive. The equation then represents a way of writing 2⋅20072 \cdot 2007 as a product of two positive integers. But the only ways of splitting 2⋅32⋅2232 \cdot 3^{2} \cdot 223 as a product of two positive integers are obtained by "distributing" its prime factors in all possible ways between the two integers, that is, explicitly
- 1 and 2⋅3⋅3⋅2232 \cdot 3 \cdot 3 \cdot 223;
- 2 and 3⋅3⋅2233 \cdot 3 \cdot 223;
- 3 and 2⋅3⋅2232 \cdot 3 \cdot 223;
- 2⋅32 \cdot 3 and 3⋅2233 \cdot 223;
- 3⋅33 \cdot 3 and 2⋅2232 \cdot 223;
- 2⋅3⋅32 \cdot 3 \cdot 3 and 223
Since (n+m+1)−(n−m)=2m+1>0(n+m+1)-(n-m)=2 m+1>0, n−mn-m is always the smaller of the two factors of the pair. Letting u=n+m+1u=n+m+1 and v=n−mv=n-m, we must then be in one of the following cases:
- v=1,u=2⋅3⋅3⋅223v=1, u=2 \cdot 3 \cdot 3 \cdot 223;
- v=2,u=3⋅3⋅223v=2, u=3 \cdot 3 \cdot 223;
- v=3,u=2⋅3⋅223v=3, u=2 \cdot 3 \cdot 223;
- v=2⋅3,u=3⋅223v=2 \cdot 3, u=3 \cdot 223;
- v=3⋅3,u=2⋅223v=3 \cdot 3, u=2 \cdot 223;
- v=2⋅3⋅3,u=223v=2 \cdot 3 \cdot 3, u=223.

Now solving the system
{n+m+1=un−m=v \left\{ \begin{array}{l} n+m+1=u \\ n-m=v \end{array} \right.
in the unknowns nn and mm we obtain
{n=u+v−12m=u−v−12 \left\{ \begin{array}{l} n=\frac{u+v-1}{2} \\ m=\frac{u-v-1}{2} \end{array} \right.
Note that substituting into the equations the six values of (u,v)(u, v) corresponding to the six possible cases, one finds each time a pair of acceptable values (n,m)(n, m) (that is, integer and positive: indeed we always have u−v>1u-v>1, and, since 2⋅20072 \cdot 2007 has only one factor of 2, in all cases exactly one of uu and vv is even, and therefore u+v−1u+v-1 and u−v−1u-v-1 are always even). For all six of these pairs, by the way they were obtained, we have (n+m+1)(n−m)=2⋅2007(n+m+1)(n-m)=2 \cdot 2007, and therefore all of them are solutions of the original equation. Moreover the six cases presented exhaust all the possibilities, so there are no other solutions. Explicitly the solutions are:
- n=2007,m=2006n=2007, m=2006;
- n=1004,m=1002n=1004, m=1002;
- n=670,m=667n=670, m=667;
- n=337,m=331n=337, m=331;
- n=227,m=218n=227, m=218;
- n=120,m=102n=120, m=102
(note however that the exercise does not ask to explicitly determine the solutions, but only to say how many there are).

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from it; metadata (topic, difficulty) added by this project.