Definition and ideals of $\mathbb{Z}/n\mathbb{Z}$ First, I want to ask what elements are in the rings $\mathbb{Z}/n\mathbb{Z}$,
the book I have defines the rings $R/I=\{a+I| a\in R\}$ where $a+I=\{x\in R| x-a \in I\}$
then proceed to give an example I can't understand how it follows the definition above.
It says $\mathbb{Z}/2\mathbb{Z}=\{2\mathbb{Z},1+2\mathbb{Z}\}$, from what I understand $\mathbb{Z}/2\mathbb{Z}$ should have all $x$ such that $x\in \mathbb{Z}  $  and $a\in \mathbb{Z}$ and $x-a \in \mathbb{2Z} $, which doesn't follow the set. A second example is $2\mathbb{Z}/4\mathbb{Z}=\{4\mathbb{Z},2+4\mathbb{Z}\}$ which is also a mystery for me. The last part it confuses me is the set $\{2\mathbb{Z},1+2\mathbb{Z}\}$ this set contines all odds and all the even numbers, why is different from $\mathbb{Z}$? Can someone explain to me what it's happening above because I am confused.

my second question is about the ideals of  $\mathbb{Z}/n\mathbb{Z}$,
can I have a simple explanation about why the ideals of $\mathbb{Z}/n\mathbb{Z}$
are the rings $k\mathbb{Z}/n\mathbb{Z}$ where $k|n$
for example, the ideals of $\mathbb{Z}/6\mathbb{Z}$ must be : $\mathbb{Z}/6\mathbb{Z}$, $2\mathbb{Z}/6\mathbb{Z}$ ,$3\mathbb{Z}/6\mathbb{Z}$, $6\mathbb{Z}/6\mathbb{Z}=<0>(?) $
 A: Here's a very simple answer for your second question, containing some essential rules of thumb to have in mind to understand basic ring theory, and in particular that of PIDs such as $\mathbb{Z}$.
In general, if $A$ is a commutative ring and $I$ an ideal of $A$, then the ideals of $A/I$ are in natural bijection with those $A$ containing $I$ (the correspondence is given by the canonical projection). In your case, $A=\mathbb{Z}$ and $I=n\mathbb{Z}$.
Now, it so happens that $\mathbb{Z}$ has the nice property of being a PID, which means in particular that every ideal is generated by a single element, e.g. $n$ which yields $(n)=n\mathbb{Z}$, and in PIDs, there is an order-reversing relation between inclusion and division : $(a) \subset(b) \Leftrightarrow b|a$, so in your case this yields $(n) \subset (k) \Leftrightarrow k|n$.
Combining these two facts, you get that the ideals of $\mathbb{Z}/n\mathbb{Z}$ are in natural bijection with the set of ideals $k\mathbb{Z}$ where $k|n$. The correspondence occurring naturally through the quotient map, one immediately concludes that the ideals of $\mathbb{Z}/n\mathbb{Z}$ are the $k\mathbb{Z}/n\mathbb{Z}$ for $k|n$.
Oh and by the way, it is usually customary to define rings such that they contain $1$, which is not the case for $k\mathbb{Z}/n\mathbb{Z}$ when $k \neq 1$, so they are not really rings, they are ideals. Some people call those rng (ring without i, i.e., without identity).
A: Question: "my second question is about the ideals of Z/nZ, can I have a simple explanation about why the ideals of Z/nZ are the rings kZ/nZ where k|n"
Answer: If $p,q \neq0$ are distinct prime numbers, it follows the ideals $I:=(p),J:=(q)$ are maximal ideals and their powers $I^n=(p^n),J^m=(q^m)$ are coprime for all $m,n \geq 1$. If $n=p_1^{l_1}\cdots l_d^{l_d}$ is a factorication into a product of powers of distinct prime numbers $p_i$, there is by the CRT an isomorphism of rings
$$A:=\mathbb{Z}/n\mathbb{Z} \cong \mathbb{Z}/p_1^{l_1}\mathbb{Z}\oplus \cdots \oplus   \mathbb{Z}/p_d^{l_d}\mathbb{Z}:=A_1 \oplus \cdots \oplus A_d.$$
The ring $A_i$ is an Artinian ring with maximal ideal $I_i:=(p_i)$. Hence the prime ideals in $A$ are the ideals on the form
$$J_i:=A_1\oplus \cdots \oplus I_i \oplus \cdots \oplus A_d$$
for $i=1,..,d$. If $m\in \mathbb{Z}$ is an integer and if $J \subseteq \mathbb{Z}$ is any ideal it follows $J=(m)$ for some $m$ - this is because $\mathbb{Z}$ is a "principal ideal domain": Any ideal $J$ is the ideal generated by an integer $m$. If $J=(0)$ in $A$ it follows $m=nd$. If you write
$$m=p_1^{a_1}\cdots p_d^{a_d} d$$
for some integer $d$ that does not contain $p_i$ as a factor, it follows $J$ gives rise to a non-zero ideal in $A$ iff $a_i<l_i$ for some $i$.
Example: Let $A:=\mathbb{Z}/p^mq^n\mathbb{Z}$. It follows
$$A\cong \mathbb{Z}/p^m\mathbb{Z} \oplus \mathbb{Z}/q^n\mathbb{Z}\cong A_1 \oplus A_2.$$
There are two prime ideals $(p)\oplus A_1, A_1\oplus (q)$ in $A$. The ring-structure in $A_1\oplus A_2$ is componentwise and the projection map
$$\pi: A \rightarrow A_1\oplus A_2$$
is the map $\pi(\overline{a}):=(\overline{a},\overline{a})$.
You should check that the map $\pi$ is "well defined". You find a proof of the CRT in Atiyah-Macdonald's book on commutative algebra, Prop.1.10.
