the quantum particle in a 1D box leads to the following eigen equation
$$\varphi_n(\alpha) = A e^{i\lambda \alpha}, \quad \alpha \in [0,2\pi], \ \lambda \in \mathbb C \tag{1}$$
and the boundary condition
$$\varphi_n(0) = \varphi_n(2\pi n), \quad n \in \mathbb Z \tag{2}$$
Now I try to solve for $\lambda$.
I use the B.C. and get $1 = \cos(2\pi n\lambda) + i \sin(2\pi n \lambda)$
which only holds for $\lambda \in \mathbb Z$ so we can just rename $\lambda$ to e.g. $n$ and get our solution
$$\varphi_n(\alpha) = A e^{i n \alpha} \tag{3}$$
Now I wanted to do this a bit more pedantic and tried this:
For $1 = \cos(2\pi n\lambda) + i \sin(2\pi n \lambda)$ to hold, we need
$$2\pi n\lambda = 2 \pi u, \quad u \in \mathbb Z \tag{4}$$
giving us: $n\lambda = u$ giving us $\lambda = \frac{u}{n} \not\in \mathbb Z$ but $\lambda = \frac{u}{n} \in \mathbb Q$.
So I don't really see my mistake here and how I'd do it correctly.