Problem

Source: China TST 2004 Quiz

Tags: algebra unsolved, algebra



Find all positive integer $ n$ satisfying the following condition: There exist positive integers $ m$, $ a_1$, $ a_2$, $ \cdots$, $ a_{m-1}$, such that $ \displaystyle n = \sum_{i=1}^{m-1} a_i(m-a_i)$, where $ a_1$, $ a_2$, $ \cdots$, $ a_{m-1}$ may not distinct and $ 1 \leq a_i \leq m-1$.