Problem

Source: Kosovo MO 2012 Grade 9, Problem 3

Tags: number theory



The integers $a_1,a_2,...,a_{2012}$ are given. Exactly $29$ of them are divisible by $3$. Prove that the sum $a_1^2+a_2^2+...+a_{2012}^2$ is divisible by $3$.