Lorenzini's "Invitation to arithmetic geometry", 1st exercise I'm reading Dino Lorenzini's book "An invitation to Arithmetic Geometry" and the very first exercise is the following

Ex. 1 Let $d\in \Bbb{Q}\backslash\Bbb{Z}.$ Show that $\Bbb{Z}[\sqrt{d}]$ is not a finitely generated abelian group.

Since this is the first exercise and judging by the fact that the other exercises are quite easy, I assume that I am missing something.
This is my guess and I would be happy if someone can check it or provide me with a solution.
$\color{red}{\textrm{EDIT: The solution below fails because of the following WRONG assumption that I silently used: If }G,H\textrm{ are finitely generated abelian groups and }H\subsetneq G\textrm{ then }rank(H)<rank(G)\textrm{ (take }G=\Bbb{Z}, H=2\Bbb{Z}) \textrm{ to arrive at a contradiction.}}$

Solution(?) Supposing that it is finitely generated, it must be a free abelian group of finite rank (since there are no elements of finite order in it). Therefore, $\Bbb{Z}[\sqrt{d}]=\Bbb{Z}^n$ for some $n$. I will show that it contains free abelian groups of arbitrarily large ranks, which is a contradiction.
Consider the elements $d, d^2, d^3,...$ and the subgroups $I_1=\langle d\rangle$, $I_2=\langle d,d^2\rangle$,..., $I_n=\langle d,\dots,d^n\rangle$. $I_1$ is free abelian of rank $1$ with $\{d\}$ as basis. Similarly $\{d,d^2\}$ is a basis for $I_2$. 
I can show that $d^3\notin I_2$ and this will give me that $I_2\subsetneq I_3$. This will mean that $rank (I_3)>rank(I_2)=2$ as I want. Notice here that $\{d,d^2,d^3\}$ are not linearly independent i.e. they do not form a basis of $I_3$. This puzzles me but I don't think it matters, since I am only interested in proving that the sequence
  $$I_1\subsetneq I_2\subsetneq ...\subsetneq I_n\subsetneq ...$$
  is non-constant. Indeed, let me show why $d^4$ cannot be written as
  $$\lambda_1 d+\lambda_2 d^2+\lambda_3 d^3$$
  for $\lambda_1, \lambda_2,\lambda_3\in\Bbb{Z}$.
Writting $d=p/q$ yields
  $$\frac{p^2}{q^2}=\lambda_1\frac{\sqrt{p}}{\sqrt{q}}+\lambda_2\frac{p}{q}+\lambda_3\frac{p}{q}\frac{\sqrt{p}}{\sqrt{q}}$$
  which can be rewritten as
$$\frac{\sqrt{p}}{\sqrt{q}}\left(\lambda_1+\lambda_3\frac{p}{q}\right)=\frac{p}{q}\left(\frac{p}{q}-\lambda_2\right)$$
  Now if $\left(\lambda_1+\lambda_3\frac{p}{q}\right)=0$ then $\frac{p}{q}=\lambda_2\in\Bbb{Z}$ (contradiction) hence
  $$\frac{\sqrt{p}}{\sqrt{q}}=\frac{\frac{p}{q}\left(\frac{p}{q}-\lambda_2\right)}{\left(\lambda_1+\lambda_3\frac{p}{q}\right)}\in\Bbb{Q}$$
  which is a contradiction too.
Similarly it can be proven that $d^{i+1}\notin I_i$, which means that $rank(I_{i+1})>rank(I_i)$ yielding the desired result.

I understand this is way too awkward to be correct... Thanks a lot for any help!
 A: If $\alpha\in\Bbb C$ and $\Bbb Z[\alpha]$ is a finitely generated Abelian group, then $\alpha$ is an algebraic integer.
To see this, write $\Bbb Z[\alpha]=\Bbb Z\beta_1+\cdots+\Bbb Z\beta_n$.
Then $\alpha\beta_j\in\Bbb Z[\alpha]$ so that
$\alpha\beta_j=\sum_{k=1}^n c_{jk}\beta_k$ with the $c_{jk}\in\Bbb Z$.
Then $\alpha$ is an eigenvalue of the integer matrix $C=(c_{jk})$,
and so is an algebraic integer.
For $d\in\Bbb Q$, $\sqrt d$ is only an algebraic integer when $d\in\Bbb Z$.
A: So, I'll give it a try...
Suppose that $d=\dfrac{a}{b},\quad gcd(a,b)=1,b>1$ and that $\mathbb{Z}[\sqrt{d}]=<d_1,...,d_n>$. Then
$$d_i=a_{0i}+a_{1i}\sqrt{d}+a_{2i}d+...+a_{n_ii}\sqrt{d}^{n_i}$$
Let $b^m$, where $m$ is the greatest power of $b$ which appears as a denominator in $d_i$'s. Now 
$$\sqrt{\dfrac{a}{b}}^{2(m+2)}=\bigg(\dfrac{a}{b}\bigg)^{m+2}\in\mathbb{Z}[\sqrt{d}]$$
so  $$\bigg(\dfrac{a}{b}\bigg)^{m+2}=\sum_{i=1}^{n}u_id_i\Rightarrow a^{m+2}=b^{m+2}\bigg(\sum_{i=1}^{n}u_id_i\bigg)\Rightarrow a^{m+2}=b^2 A+b^2B\sqrt{d}$$
where $A,B\in\mathbb{Z}$
$$\Rightarrow a^{m+2}-b^2A=b^2B\sqrt{d}\Rightarrow a^{2m+4}+b^4A^2-2a^{m+2}b^2A=b^4B^2d=b^3B^2a$$
$$\Rightarrow a^{2m+4}=-b^4A^2+2a^{m+2}b^2A+b^3B^2a$$
But then $b|$right side and $b\not|$left side, contradiction!
Maybe I miss something, please let me know...
A: Here's an elementary solution, which only uses the structure theorem for finitely generated abelian groups:
Assume on the contrary, that $\mathbb{Z}[{\sqrt{d}}]$  is a finitely generated abelian group. Then the subgroup $\mathbb{Z}[d]$ is also finitely generated. But showing that the latter is not finitely generated when $d \in \mathbb{Q} - \mathbb{Z}$ is very easy...
