Problem

Source: 2001 Moldova MO Grade 7 P7

Tags: set, number theory



Let $n$ be a positive integer. We denote by $S$ the sum of elements of the set $M=\{x\in\mathbb N|(n-1)^2\le x<(n+1)^2\}$. (a) Show that $S$ is divisible by $6$. (b) Find all $n\in\mathbb N$ for which $S+(1-n)(1+n)=2001$.