Mock AIME 2 2006-2007/Problem 3
From AoPSWiki
Problem
Let
be the sum of all positive integers
such that
is a perfect square. Find the remainder when
is divided by
Solution
If
, we can complete the square on the left-hand side to get
so
. Subtracting
and factoring the left-hand side, we get
.
, which can be split into two factors in 3 ways,
. This gives us three pairs of equations to solve for
:
and
give
and
.
and
give
and
.
and
give
and
.
Finally,
, so the answer is
.




