Example 1. Taking $r = 1$ and $p=2$, to find a number field $K$ such that $\mathcal O_K$ needs at least two generators as a $\mathbf Z$-algebra ($K$ is not "monogenic") it is sufficient to find a $K$ such that $[K:\mathbf Q] > 2$ and $2$ splits completely in $\mathcal O_K$, such as a cubic field in which $2$ splits completely. Dedekind found the first example of such a field: $\mathbf Q(\alpha)$ where $\alpha^3 - \alpha^2 - 2\alpha - 8 = 0$. A method of constructing infinitely many such $K$ is to use the cubic subfield of the cyclotomic field $\mathbf Q(\zeta_p)$ for primes $p$ such that $p \equiv 1 \bmod 3$ and $2^{(p-1)/3}\equiv 1 \bmod p$; that means $p$ splits completely in $\mathbf Q(\sqrt[3]{2},\zeta_3)$, and there are infinitely many such $p$ (and hence infinitely many such cubic fields) since the density of such $p$ is $1/6$ by the Chebotarev density theorem. The first few such $p$ are $31$, $43$, $109$, and $127$. For example, using PARI and Galois theory, the cubic subfield of $\mathbf Q(\zeta_{31})$ is $\mathbf Q(\alpha)$ where $\alpha$ is a root of $$x^3 + x^2 - 10x - 8$$ and $2$ splits completely in this cubic field (e.g., PARI says this cubic polynomial splits completely over $\mathbf Q_2$) so the ring of integers of this cubic field needs at least $2$ generators as a $\mathbf Z$-algebra. (This cubic field is different from Dedekind's, e.g., Dedekind's cubic field has discriminant -2012 -- too bad I didn't write about$1$ real embedding while this 6 years ago!cubic field has --$3$ real embeddings, of Dedekind's cubic field has discriminant $-503$ while this cubic field has discriminant $3844=62^2$$961 = 31^2$.)