Problem 725: (2008 AIME II, 15)
Find the largest integer $n$ satisfying the following conditions: (i) $n^2$ can be expressed as the difference of two consecutive cubes; (ii) $2n + 79$ is a perfect square.
- $n^2=(m+1)^3-m^3=3m^2+3m+1$, so $4n^2-1=3(2m+1)^2$, i.e.\ $(2n-1)(2n+1)=3(2m+1)^2$.
- The odd factors $2n-1,2n+1$ are coprime, so one is a square and the other three times a square. $2n+1=a^2$, $2n-1=3b^2$ is impossible mod $3$; so $2n-1=a^2$.
- With $2n+79=s^2$, $s^2-a^2=80$, so $(s-a)(s+a)=80$ with both even: $(2,40),(4,20),(8,10)$, giving $a=19,8,1$. $a$ is odd, so $a=19$ or $1$, so $n=181$ or $1$.
- Check: $181^2=32761=105^3-104^3$. The answer is $\boxed{181}$.
Find the largest integer $n$ satisfying the following conditions: (i) $n^2$ can be expressed as the difference of two consecutive cubes; (ii) $2n + 10$ is a perfect square.