Problem

Source: 2016 China Northern MO, Grade 10, Problem 8

Tags: combinatorics



Set $A=\{1,2,\cdots,n\}$. If there exists nonempty sets $B,C$, such that $B\cap C=\varnothing,B\cup C=A$. Sum of Squares of all elements in $B$ is $M$, Sum of Squares of all elements in $C$ is $N$, $M-N=2016$. Find the minimum value of $n$.