Problem

Source: ISL 2021 A2

Tags: algebra, floor function, IMO Shortlist, ISL 2021, Summation, NumberTheory



Which positive integers $n$ make the equation \[\sum_{i=1}^n \sum_{j=1}^n \left\lfloor \frac{ij}{n+1} \right\rfloor=\frac{n^2(n-1)}{4}\]true?