Let $\ell$ be a positive integer. We say that a positive integer $k$ is nice if $k!+\ell$ is a square of an integer. Prove that for every positive integer $n \geqslant \ell$, the set $\{1, 2, \ldots,n^2\}$ contains at most $n^2-n +\ell$ nice integers. (Théo Lenoir)
Problem
Source: 10th European Mathematical Cup - Problem J3
Tags: factorial, Perfect Square, number theory, emc, European Mathematical Cup
22.12.2021 22:07
22.12.2021 22:43
BarisKoyuncu wrote:
What is motivation behind choosing numbers $k^2+2k$ and $k^2+2k+1$? During contest I tried to show that both of $k^2+1$ and $k^2+2$ can't be nice, but making a small mistake made my solution fakesolve.
22.12.2021 22:55
Jalil_Huseynov wrote: What is motivation behind choosing numbers $k^2+2k$ and $k^2+2k+1$? During contest I tried to show that both of $k^2+1$ and $k^2+2$ can't be nice, but making a small mistake made my solution fakesolve. Maybe I can help. Suppose we want to try proving that one among two consecutive $A!+\ell$, $(A+1)!+\ell$ is a square (I'm not sure how to motivate this step, but I think it's a reasonable thing to try). Then, suppose for the sake of contradiction that $A!+\ell=x^2$ and $(A+1)!+\ell=y^2$. We then have $y^2-\ell=(A+1)(x^2-\ell)$, or $A\ell=(A+1)x^2-y^2$. Now, if $A+1$ is not a square, this is a Pell-like equation, which has infinitely many solutions $(x,y)$, or in other words $x$ and $y$ can get arbitrarily large. Thus it makes sense to try setting $A+1$ to be a square. After that, the problem falls apart for size reasons as the right hand side is then at least $\sqrt{A+1}x+y$, and $x$ and $y$ are large when compared to $A$ and $\ell$.
22.12.2021 23:00
square_root_of_3 wrote: Jalil_Huseynov wrote: What is motivation behind choosing numbers $k^2+2k$ and $k^2+2k+1$? During contest I tried to show that both of $k^2+1$ and $k^2+2$ can't be nice, but making a small mistake made my solution fakesolve. Maybe I can help. Suppose we want to try proving that one among two consecutive $A!+\ell$, $(A+1)!+\ell$ is a square (I'm not sure how to motivate this step, but I think it's a reasonable thing to try). Then, suppose for the sake of contradiction that $A!+\ell=x^2$ and $(A+1)!+\ell=y^2$. We then have $y^2-\ell=(A+1)(x^2-\ell)$, or $A\ell=(A+1)x^2-y^2$. Now, if $A+1$ is not a square, this is a Pell-like equation, which has infinitely many solutions $(x,y)$, or in other words $x$ and $y$ can get arbitrarily large. Thus it makes sense to try setting $A+1$ to be a square. After that, the problem falls apart for size reasons as the right hand side is then at least $\sqrt{A+1}x+y$, and $x$ and $y$ are large when compared to $A$ and $\ell$. Yeah, it's actually reasonable. Thank you!
23.12.2021 00:05
Let me just point out that when $l$ is not a square, we can choose a prime divisor $p$ of $l$ such that $v_p(l)$ is odd, so any $k>2p-1$ gives that $k!+l$ is not a perfect square. Sadly, such a construction with odd $v_p$ can't be made when $l$ is a square.
23.12.2021 18:24
Lovely problem and a nice connection to the famous unsolved Brocard's equation $n! + 1 = m^2$. Call an integer "bad" if it is not nice - so we wish to prove that there are at least $n-\ell$ bad integers. We do this inductively on $n$, with the case $n=\ell$ being trivial. In order to succed with the induction step, one would like to prove that $\{n^2+1, n^2+2, \ldots, n^2+2n, n^2+2n+1\}$ contains at least one bad integer. So suppose not and let $(n^2+k)! + \ell = a_k^2$ for $k=1,\ldots,2n+1$. We obtain the recursion $a_{k+1}^2 = \ell + (n^2+k+1)(a_k^2 - \ell)$, i.e. $(n^2+k+1)a_k^2 - a_{k+1}^2 = (n^2+k)\ell$. In particular, $a_{2n+1} < (n+1)a_{2n}$ and so $a_{2n+1} \leq (n+1)a_{2n} - 1$, whence $n^3 + 2n^2 \geq (n^2 + 2n)\ell = (n+1)^2a_{2n}^2 - a_{2n+1}^2 \geq 2(n+1)a_{2n} + 1$, implying $a_{2n} \leq \frac{n^3+2n^2 - 1}{2n+2} = \frac{n^2+n-1}{2} = \frac{n(n+1)}{2} - \frac{1}{2}$, i.e. $a_{2n} \leq \frac{n(n+1)}{2}-1$. However, from $a_{2n}^2 = (n^2+2n)! + \ell$ we get $a_{2n}^2 > (n^2+2n)!$, contradiction for all $n\geq 1$.
23.12.2021 19:27
As VicKmath7 pointed out if $l$ is not a square few cases are left to check $(n=1,2)$. If $l$ is a square then both $(m^2-1)!+l=l((m^2-1)!/l+1)$ and $(m^2)!+l=l((m^2)!/l+1)$ cannot be square for $m^2-1 \ge l$. To prove this assume that $t^2=(m^2-1)!/l+1)$. Then $(mt-1)^2<(m^2)!/l+1=m^2t^2-m^2+1<(mt)^2$. Last one is true because $2t> m \iff 4t^2 > m^2 \leftarrow 4t^2 >4(m^2-2)!\ge m^2$. Thus at most one of them is a square. There are $n$ squares less than or equal to $n$. There are at most $l$ squares less than $l+1$. Thus there are at most $n^2-n+l$ nice numbers.