Find all pairs $(n, p)$ of positive integers such that $p$ is prime and \[ 1 + 2 + \cdots + n = 3 \cdot (1^2 + 2^2 + \cdot + p^2). \]
Problem
Source: 2021 MEMO T-7
Tags: number theory, Diophantine equation, memo, MEMO 2021, easy number theorem
05.09.2021 21:40
no solution
05.09.2021 21:57
Actually, $(n,p)=(5,2)$ works. $1+2+3+4+5=15$ $3\cdot\left(1^2+2^2\right)=3\times5=15$
05.09.2021 22:09
We would like to solve the following, $$n(n+1)=p(p+1)(2p+1).$$ If $p\mid n$, then $n=pk$, thus $k(pk+1)=(p+1)(2p+1)$. In this case, $$pk+1\mid (p+1)(2p+1),$$this divisibility actually simplifies to $pk+1\mid 2p+3-k$, which means that $k=2,1$, no solutions in either case. If $p\mid n+1$, then $n=pk-1$, thus $k(pk-1)=(p+1)(2p+1)$. In this case, $$pk-1\mid (p+1)(2p+1).$$Hence, we get that $pk-1 \mid k+2p+3$, which means that $2p+4\geq (p-1)k$. Thus either $k=1,2$ and for $k\geq 3$, we have $p\leq 7$. Examining all those possibilities; $k=1\implies p-1=(p+1)(2p+1)$ obvious impossible due to size reasons. $k=2\implies 2(2p-1)=(p+1)(2p+1)$, which is impossible, because $2p+1>2p-1,p+1> 2$. $p=2\implies n^2+n=30\implies n=5$, this works. $p=3\implies n^2+n=84\implies $ no $n\in\mathbb N$. $p=5\implies n^2+n=330\implies $ no $n\in\mathbb N$. $p=7\implies n^2+n=840\implies $ no $n\in\mathbb N$. We conclude that our only solution is $\boxed{(n,p)=(5,2)}$.
05.09.2021 22:12
Note that if $p = 2$, then $n = 5$ and $(5,2)$ works. If $p = 3$, there is no solution. So assume $p \geq 5$. Rewrite the equation as $n(n+1) = p(p+1)(2p+1)$. If $p \mid n$, let $n = pk$, then $k(pk+1) = (p+1)(2p+1)$. Note that $(p+1)(2p+1) = k(pk+1) > k^2p \implies k^2 < \frac{(p+1)(2p+1)}{p} = (p+1)(2+\frac{1}{p}) \leq 5(p+1)/2 \implies k < \sqrt{5(p+1)/2} < p$ when $p \geq 5$. Also taking equation modulo $p$ we see that $k \equiv 1 \pmod{p}$, combining this with $k < p$ gives that $k=1$, but there is no solution in that case. If $p \mid n+1$, let $n=pk-1$, then $k(pk-1) = (p+1)(2p+1)$ Note that $(p+1)(2p+1) = k(pk-1) > k^2(p-2) \implies k < \sqrt{\frac{(p+1)(2p+1)}{p-2}} < p$ when $p \geq 5$. Also taking the equation modulo $p$ we see that $k \equiv -1 \pmod{p}$, so $k = p-1$. So, $(p-1)(p^2 - p - 1) = (p+1)(2p+1)$. But it can be checked that there is no solution to this. Thus we are done.
06.09.2021 03:21
06.09.2021 18:17
uwu Really nice problem
16.01.2022 19:50
$$n(n+1) = p(p+1)(2p+1)$$
20.06.2022 10:34
Here is a link to a video solution: https://youtu.be/z1D-jRkrJbc