2008 iTest Problems/Problem 83

Problem

Find the greatest natural number $n$ such that $n\leq 2008$ and $(1^2+2^2+3^2+\cdots + n^2)\left[(n+1)^2+(n+2)^2+(n+3)^2+\cdots + (2n)^2\right]$ is a perfect square.

Solution

Notice that $\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}$, so \begin{align*} \sum_{i=n+1}^{2n} i^2 &= \sum_{i=1}^{2n} i^2 - \sum_{i=1}^n i^2 \\ &= \frac{2n(2n+1)(4n+1)}{6} - \frac{n(n+1)(2n+1)}{6} \\ &= \frac{16n^3 + 12n^2 + 2n}{6} - \frac{2n^3 + 3n^2 + n}{6} \\ &= \frac{14n^3 + 9n^2 + n}{6} \\ &= \frac{n(2n+1)(7n+1)}{6} \end{align*} Thus, $\left( \sum_{i=1}^n i^2 \right)\left(\sum_{i=n+1}^{2n} i^2 \right) = \frac{n^2 (2n+1)^2 (n+1)(7n+1)}{36}$. In order for the expression to be a perfect square, $(n+1)(7n+1)$ must be a perfect square.


By using the Euclidean Algorithm, $\gcd(n+1,7n+1) = \gcd(n+1,6)$. Thus, the GCD of $n+1$ and $7n+1$ must be factors of 6. Now, split the factors as different casework. Note that the quadratic residues of 7 are 0, 1, 2, and 4.

  • If $\gcd(n+1,7n+1) = 6$, then $n \equiv 5 \pmod{6}$. Let $n = 6a+5$, so $(n+1)(7n+1) = (6a+6)(42a+36) = 36(a+1)(7a+6)$. Since 6 is divided out of $n+1$ and $7n+1$, $a+1$ and $7a+6$ are relatively prime, so $a+1$ and $7a+6$ must be perfect squares. However, since 6 is not a quadratic residue of 7, the GCD of $n+1$ and $7n+1$ can not be 6.
  • If $\gcd(n+1,7n+1) = 3$, then $n \equiv 2 \pmod{3}$. Let $n = 3a+2$, so $(n+1)(7n+1) = (3a+3)(21a+15) = 9(a+1)(7a+5)$. Since 3 is divided out of $n+1$ and $7n+1$, $a+1$ and $7a+5$ are relatively prime, so $a+1$ and $7a+5$ must be perfect squares. However, since 5 is not a quadratic residue of 7, the GCD of $n+1$ and $7n+1$ can not be 3.
  • If $\gcd(n+1,7n+1) = 2$, then $n \equiv 1 \pmod{2}$. Let $n = 2a+1$, so $(n+1)(7n+1) = (2a+2)(14a+8) = 4(a+1)(7a+4)$. Since 2 is divided out of $n+1$ and $7n+1$, $a+1$ and $7a+4$ are relatively prime, so $a+1$ and $7a+4$ must be perfect squares. We also know that $n+1$ and $7n+1$ do not share a factor of 3, so $n \equiv 1,3 \pmod{6}$. That means $n \le 2007$, so $a \le 1003$. After trying values of $a$ that are one less than a perfect square, we find that the largest value that makes $(n+1)(7n+1)$ a perfect square is $a = 960$. That means $n = 1921$.
  • If $\gcd(n+1,7n+1) = 1$, then $n+1 \equiv 1,5 \pmod{6}$ (to avoid common factors that are factors of 6), so $n \equiv 0,4 \pmod{6}$. After trying values of $n$ that are one less than a perfect square, we find that the largest value that makes $(n+1)(7n+1)$ a perfect square is $n = 120$ (we could also stop searching once $n$ gets below 1921).

From the casework, the largest natural number $n$ that makes $(1^2+2^2+3^2+\cdots + n^2)\left[(n+1)^2+(n+2)^2+(n+3)^2+\cdots + (2n)^2\right]$ is a perfect square is $\boxed{1921}$.

See Also

2008 iTest (Problems)
Preceded by:
Problem 82
Followed by:
Problem 84
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100