Is this module a free $\mathbb{Z} $ module?
Solution 1:
A free $\mathbb{Z}$-module cannot have torsion elements, that is, elements $x$ such that $mx=0$ for some integer $m\ne0$, because $\mathbb{Z}$ has no torsion element and a free module is a direct sum of copies of $\mathbb{Z}$.
Your direct sum has torsion elements as soon as $n_i>0$ for some $i$.
It should be also noted that proving that the set you considered is not a basis doesn't prove that the module isn't free. For instance, $\mathbb{Z}$ is free and $\{2,3\}$ is a generating system that's not linearly independent. In other words, if you prove that some set is a basis, then the module is free; if you prove that some (generating) set is not a basis, you proved nothing.