Let $n$ be a positive integer. Mary writes the $n^3$ triples of not necessarily distinct integers, each between $1$ and $n$ inclusive on a board. Afterwards, she finds the greatest (possibly more than one), and erases the rest. For example, in the triple $(1, 3, 4)$ she erases the numbers 1 and 3, and in the triple $(1, 2, 2)$ she erases only the number 1, Show after finishing this process, the amount of remaining numbers on the board cannot be a perfect square.
Problem
Source: Mexico National Olympiad 2015 Problem 4
Tags: number theory, combinatorics
29.11.2015 05:26
The number of remaining numbers is $N = n(n-1)(n-2) \cdot 1 + \frac{3n(n-1)}{2} \cdot 2 + \frac{3n(n-1)}{2} \cdot 1 + n \cdot 3 = \frac{n(n+1)(2n+1)}{2}$. Now suppose $N$ is perfect square. Case 1. $n = 2k$. Then $N = k(2k+1)(4k+1)$, so since $k, 2k+1, 4k+1$ are pairwise relatively prime, they are each squares. Thus $k = s^2$ for some $s \ge 1$. But $(2s)^2 < 4s^2+1 < (2s+1)^2$ for all $s \ge 1$, so $4s^2 + 1$ is not perfect square, contradiction. Case 2: $n = 2k-1$ for $k \ge 1$. Then $N = k(2k-1)(4k-1)$, so since $k, 2k+1, 4k+1$ are pairwise relatively prime, they are each squares. Thus $k = s^2$ for some $s \ge 1$. But $(2s-1)^2 < 4s^2-1 < (2s)^2$ for all $s \ge 1$, so $4s^2 - 1$ is not perfect square, contradiction. EDIT: Oops solution fixed
29.11.2015 06:44
suli wrote: The number of remaining numbers is $n(n^2 + 3n - 1)$. Because $n$ and $n^2 + 3n - 1$ are relatively prime, $n^2 + 3n - 1$ must be a perfect square for the product to be a perfect square; but this cannot happen, as $4n^2 + 12n - 4 = (2n + 3)^2 - 13 = k^2$ yields no solutions in $(n, k)$ after factoring $(k - (2n+3))(k + (2n+3)) = 13$. I'm pretty sure this is incorrect, check the remaining numbers
29.11.2015 08:21
Quote: The number of remaining numbers is $n(n^2 + 3n - 1)$. Because $n$ and $n^2 + 3n - 1$ are relatively prime, $n^2 + 3n - 1$ must be a perfect square for the product to be a perfect square; but this cannot happen, as $4n^2 + 12n - 4 = (2n + 3)^2 - 13 = k^2$ yields no solutions in $(n, k)$ after factoring $(k - (2n+3))(k + (2n+3)) = 13$. This post has been edited 1 time. Last edited by suli, 3 hours ago] i don't that is correct. what if all her triples are (n,n,n) ?
30.11.2015 04:32
Proposed by Daniel Perales
07.12.2015 05:30
I did this problem five minutes after the test was done, it was kind of sad that I just scored $5$ points. Anyway, here is my solution We can easily get that the number of remaining numbers is $\frac{n(n+1)(2n+1)}{2}$. We can see that $n, (n+1)$ and $(2n+1)$ are coprimes. Case 1: $n=2k$ $\longrightarrow k(2k+1)(4k+1)=m^2 \longrightarrow k=a^2$ and $4k+1=b^2$ $\longrightarrow 4a^2+1=b^2 \longrightarrow 1=b-(2a)^2$ since $b, a>0$ there are not solutions for this case. Case 2: $n=2k+1$ $\longrightarrow (2k+1)(k+1)(4k+3)=m^2 \longrightarrow k+1=a^2$ and $4k+3=b^2$ $\longrightarrow 4a^2-1=b^2 \longrightarrow (2a)^2-b^2=1$ since $b, a>0$ there are not solutions and we are done
05.11.2016 21:37
Sorry, can you explain how you got the number of remaining numbers? Thanks