producing element of infinite order in direct product of quotient groups

The question is to produce an element that has infinite order in $$\prod_{i} \mathbb{Z}/p_i\mathbb{Z}$$ such that $$i$$ is over $$\mathbb{Z}^+$$ and $$p_i$$ denotes the $$i^{th}$$ integer prime. I am having trouble doing so.

For more context, a previous part of this question asked us to prove that the subgroup of elements in the restricted direct product of $$\prod_{i} \mathbb{Z}/p_i\mathbb{Z}$$ contains only elements of finite order, and I was able to show that, so I assume we are looking for any/all elements that have identity components in infinitely many places.

• How about $1{}$? – Lord Shark the Unknown Nov 1 '18 at 20:45
• Since you have the direct product any element with all non-zero components in the tuple will have infinite order I believe. Since the order of any element in the tuple will be the product of the orders of the individual components. – Aaron Zolotor Nov 1 '18 at 20:52
• Exercise: the torsion subgroup of this group is precisely the restricted direct product. – YCor Nov 1 '18 at 22:22

So take the sequence $$x=(1,1,1,1,\ldots)$$. Here by $$1$$ I mean $$1+p_i\mathbb{Z}$$. Actually any generator of $$\mathbb{Z}/p_i\mathbb{Z}$$ will be ok.
Note that $$x$$ is of infinite order. Indeed, if $$nx=0$$ for some $$n>0$$ then by looking at each coordinate you get $$n1\equiv 0\text{ mod }p_i$$ for all $$p_i$$. This clearly is false if $$p_i$$ is an unbounded sequence (you don't even need $$p_i$$'s to be prime).
In case each $$p_i$$ is a distinct prime you can check that $$(x_1,x_2,\ldots)$$ is of finite order if and only if $$x_i=0$$ eventually.