Problem

Source: Brazil EGMO/Cono sur TST 2020

Tags: number theory



Determine all positive integers $n$ such that $\frac{n(n-1)}{2}-1$ divides $1^7+2^7+\dots +n^7$.