Maths Olympiad Prep

Library / /73 of 129

Number theory Difficulty 5.4 AIME, harder Prove it Slovenia

Find all positive integers nn for which n24\lfloor \frac{n^2}{4} \rfloor is a perfect square.

Solution

Let nn be even, n=2kn = 2k. Then n24=k2\frac{n^2}{4} = k^2 is even, so n24=k2\lfloor \frac{n^2}{4} \rfloor = k^2 is a perfect square.

If nn is odd it can be written as n=2k+1n = 2k + 1, k0k \ge 0. In this case
n24=4k2+4k+14=k2+k+14=k2+k=k(k+1). \lfloor \frac{n^2}{4} \rfloor = \lfloor \frac{4k^2 + 4k + 1}{4} \rfloor = \lfloor k^2 + k + \frac{1}{4} \rfloor = k^2 + k = k(k + 1).
For k(k+1)k(k + 1) to be a perfect square both kk and k+1k + 1 have to be perfect squares since they are coprime. Hence, k=a2k = a^2 and k+1=b2k + 1 = b^2. This implies (ba)(b+a)=1(b-a)(b+a) = 1. There are two possibilities, ba=1=b+ab-a = 1 = b+a or ba=1=b+ab-a = -1 = b+a. Both imply k=0k=0, so n=1n=1 is the only odd number with the required property.

There is another way to deal with the case where k2+kk^2 + k is a perfect square. The quadratic equation k2+kx2=0k^2 + k - x^2 = 0 has two solutions, k1,2=1±1+4x22k_{1,2} = \frac{-1 \pm \sqrt{1+4x^2}}{2}, so 1+4x2=y21 + 4x^2 = y^2 or, equivalently, (y2x)(y+2x)=1(y - 2x)(y + 2x) = 1. This implies x=0x = 0, so k=0k = 0.

We conclude that n24\lfloor \frac{n^2}{4} \rfloor is a perfect square if and only if n=1n = 1 or nn is even.

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

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.