Mock AIME 1 2010 Problems/Problem 1

Since $n^2 = 7k+4$, $n^2$ is congruent to $4$ mod $7$. Taking the square root of both sides, we obtain $n$ is congruent to $\pm 2$ mod $7$. Solving, $n$ is congruent to either $2$ or $5$ mod $7$. The maximum of $a_k$ is $14074$, of which the square root is between $118$ and $119$. So, $n$ must be less than $118$. The series of solutions for $n$ is $2, 9, 16...114$ and $5, 12, 19...117$. However, $2$ does not work because $2^2 = 4$, a value not possible for $a_k$. Thus, there are $16 + 17$ different solutions for a total of $\boxed{33}$ solutions.