Let $n \in \mathbb{Z}$ be square free and consider the field extension $K=\mathbb{Q(\sqrt{n}})$ . What is $|\mathcal O_k/\mathbb{Z[\sqrt{n}]}|$? , where $\mathcal O_k $ denotes the ring of integers in $K$ .
My idea is to consider the two cases $n \equiv 2,3 \ (4)$ and $n \equiv 1 \ (4)$
In the first case the index is $1$ , in the second case $\mathcal O_k=\mathbb{Z[\frac{1+\sqrt{n}}{2}}]$
For a number field $K := \Bbb Q(\sqrt{d})$ with $d$ squarefree the ring of integers is of the form $$ \mathcal O_K = \begin{cases} \Bbb Z[\frac{1 + \sqrt{d}}{2}] \quad &\text{if $d \equiv 1 \mod 4$} \\ \Bbb Z[\sqrt{d}]\quad &\text{otherwise}\end{cases}. $$ This can be deduced from Theorem 3.10 in Stevenhagen's notes, which can be found here: http://websites.math.leidenuniv.nl/algebra/ant.pdf. The proof is an exercise in these same notes.
If $d \not \equiv 1 \mod 4$, then the index is $1$ as you've said.
If $d \equiv 1 \mod 4$ then I claim the index is $2$.
This is because in this case $\mathcal O_K$ is generated by $1$ and $\frac{1 + \sqrt{d}}{2}$. Clearly $\frac{1 + \sqrt{d}}{2} \not \in \Bbb Z[\sqrt{d}]$, so its class in the quotient $\mathcal O_K / \Bbb Z[\sqrt d]$ is different from that of $1$. So the index is at least two.
Now consider some multiple $x = n \cdot\frac{1 + \sqrt{d}}{2}$ of the nontrivial generator. If $n$ is even, then $n \in \Bbb Z[\sqrt d]$, so $x \equiv 1$ in $\mathcal O_K / \Bbb Z{\sqrt d}$. If $n$ is odd, then $n = 2k + 1$ for some integer $k$, and $x = 2k \cdot \frac{1 + \sqrt{d}}{2} + \frac{1 + \sqrt{d}}{2} \equiv \frac{1 + \sqrt{d}}{2}$ in $\mathcal O_K/\Bbb Z[\sqrt d]$.
So the quotient has exactly two classes, and so the index is 2.