I watched some derivations of the density of states in a square box of length L with potential $V=0$ for the points inside the box and $V=\infty$ outside the box.
Using separation of variable one can get $\frac{2mE}{\hbar^2} = k\_x^2+k\_y^2+k\_z^2$ with $k\_j = \frac{\pi}{L}n\_j$ and $n\_j$ an integer.
Defining $k^2 = k\_x^2+k\_y^2+k\_z^2$ and assuming $k$ is very big we can calculate how many different wave functions there are with a $k$ having a length between $k$ and $k+dx$ by taking the volume of the shell of a sphere with radius $k$, which is $4\pi k^2dk$ and divide this by the volume $(\frac{\pi}{L})^3$. We must multiply the result by $2$ since each combination of $k\_j$ can have two different spins.
Summing up I would have said that the density of states is:
$g(k)dk = 2\frac{4\pi k^2dk}{(\frac{\pi}{L})^3}$

The thing is the solution says that we only consider the positive $n\_j$ so we should multiply the whole thing with $1/8$. I don't understand why wave function with negative $n\_j$ should not be taken into account since for example a wave function with $n\_x=1, n\_y=2, n\_z=3$ does not have the same "direction" as a wave with $n\_x=-1, n\_y=2, n\_z=3$ so I don't get why we shouldn't count both.