jasperE3 wrote:
Let $n$ be a natural number. Solve the equation
$$||\cdots|||x-1|-2|-3|-\ldots-(n-1)|-n|=0.$$
Let $f_n(x)$ be the given function.
An easy induction gives :
$\forall x\ge \frac{n(n+1)}2$ : $f_n(x)=x-\frac{n(n+1)}2$
$\forall x\in\left(2-\frac{n(n+1)}2,\frac{n(n+1)}2\right)$ : $f_n(x)\in(0,n]$
$\forall x\le 2-\frac{n(n+1)}2$ : $f_n(x)=2-\frac{n(n+1)}2-x$
Hence the answer : $\boxed{x\in\left\{2-\frac{n(n+1)}2,\frac{n(n+1}2\right\}}$