# Prime numbers dividing infinitely many numbers in a sequence

Here I found a question:

Show that every prime not equal to $$2$$ or $$5$$ divides infinitely many of the numbers $$1,11,111,1111,\dots$$ etc.

which is partly solved here Prime numbers divide an element from a set.

From this the following conjecture seems reasonable:

Given any finite set $$S=\{q_1,\dots,q_k\}$$ of $$k$$ primes, then any prime $$p\notin S$$ divides infinitely many of the numbers $$a_1,a_2,a_3\dots$$, where $$a_1=1$$ and $$a_{n+1}=1+a_n\prod q_i$$.

Can this be proved?

• Please don't reapply the conjecture tag to personal conjectures that turn out to be (well-)known results. – Bill Dubuque May 6 at 7:15

## 2 Answers

By induction $$\,a_n = \dfrac{q^n-1}{q-1},\ q = \prod q_i.\,$$ $$a_n$$ is a divisibility sequence, i.e. $$\,n\mid m\Rightarrow a_n\mid a_m\,$$ so $$\,p\mid a_n\mid a_{nk}\Rightarrow p\mid a_{nk}\,$$ for all $$\,k\in\Bbb N$$

Define $$Q:=\prod q_i$$. When $$Q=1$$ the result is trivial.

Otherwise, it is clear that $$a_n = {\underbrace{11\dots1_Q}_{n\ 1\text{'s}}}=1+Q+Q^2+\dots+Q^{n-1} = \dfrac {Q^n - 1}{Q-1}$$.

The rest essentially follows from changing $$10$$ to $$Q$$. Details below:

Choose your $$p\notin S$$.

For $$p\nmid (Q-1)$$, as by Fermat $$p\mid (Q^{k(p-1)}-1)$$ for all $$k\in \mathbb N$$, $$p \mid a_{k(p-1)}$$ by coprimality.

For $$p \mid (Q-1)$$, observe that $$a_n = 1+Q+Q^2+\dots+Q^{n-1}\equiv1+1+1^2+\dots +1^{n-1}\equiv n \pmod Q$$ so $$a_{kp}\equiv kp\equiv 0 \pmod p$$ for all $$k\in \mathbb N$$.