Question: Find all ring homomorphisms from $\mathbb{Q} \rightarrow \mathbb{Z}$.
 How to solve the problem? Give me some suitable solution. Thanks for helping me.

Answer: 
Note that:$$a\_1(1+a\_2(1+a\_3(1+a\_4(1+a\_5(1+a\_6))))) = 248 = 2^3(31)$$ 
$a\_1$ has to be 2, because $1+a\_2(1+a\_3(1+a\_4(1+a\_5(1+a\_6))))\geq 63.$ And so now we're solving for:
$$a\_2(1+a\_3(1+a\_4(1+a\_5(1+a\_6)))) = 123.$$ 

Following the same kind of argument, keeping in mind the constraint $a\_i\geq2$, we arrive to the conclusion that there do not exist such numbers.
I will provide the first step, from which you can hopefully complete the proof yourself. As @snulty mentioned, we can factor this as follows:
$$
a\_1(1 + a\_2(1 + a\_3(1 + a\_4(1 + a\_5(1 + a\_6))))) = 2^3 \cdot 31.
$$
This implies that $a\_1 = 2$ or $a\_1 \geq 4$. However, if $a\_1 \geq 4$, we have 
$$
a\_1(1 + a\_2(1 + a\_3(1 + a\_4(1 + a\_5(1 + a\_6))))) \geq 4(1 + 2(1 + 2(1 + 2(1 + 2(1 + 2))))) = 252,
$$
hence this is not an option. 

We find $a\_1 = 2$, hence the problem is reduced to
$$a\_2(1 + a\_3(1 + a\_4(1 + a\_5(1 + a\_6)))) = 123.$$

The prime factorization of $123$ is $3 \cdot 41$, so what can we conclude about the value of $a\_2$? Finish the rest of the proof!