Why is the remainder uniformly distributed when 1,2,3,... are divided by an irrational number? Let remainder $r$ be defined as
$$
r = n - pq
$$
where $n \in \mathbb{N}$ is the dividend , $q \in \mathbb{R}$ is the divisor, and $p = \mathrm{floor}(n/q)$.
I calculated the remainders by dividing by $\pi$ for $1,2,\dots,100000$, then I got the reminders seem to follow a uniform distribution on $[0,\pi)$.

When the divisor is rational, it's obvious that the remainder is limited to some certain values.
When it comes to a irrational divisor, it makes intuitive sense to me that the remainders can have any values on $[0,q)$, and follow a uniform distribution. However, I have no idea how to prove this.
EDIT: Added histogram.

Dividing your formula by $q=\pi$ gives
$$
n \cdot \frac{1}{\pi}
= p + \frac{r}{\pi}
,
$$
so $p$ is the integer part,
and $\frac{r}{\pi}$ is the fractional part, of $n \cdot \frac{1}{\pi}$.
As $n$ runs through the integers, this fractional part $\frac{r}{\pi}$ is uniformly distributed on $[0,1)$
by Weyl's equidistribution theorem,
since $\frac{1}{\pi}$ is irrational. Hence $r$ is uniformly distributed on $[0,\pi)$.
