# prime dividing no term in a sequence

Let $$q_1,\cdots,q_m$$ be distincts elements of $$\mathbb N\setminus\{0,1\}$$. Does there exist non zero integers $$A_1,\cdots,A_m$$ such that infinitely many primes divide no elements of the sequence $$\left(A_1q^n_1+\cdots+A_mq_m^n\right)_{n\in\mathbb N}$$?

• I believe the answer is no if the q_i are sufficiently distinct. I will see I can find a reference. Gerhard "Checking On My Advisor's Work" Paseman, 2019.12.08. – Gerhard Paseman Dec 9 '19 at 2:59
• The answer to the literal question is "yes" with $A_1 = 1$ and $A_2 = \dotsc = A_m = 0$. So please disallow $A_i = 0$ or I will post this answer... – WhatsUp Dec 9 '19 at 4:36
• It is believed that up to simple obstructions, if for one $p$ the sequence is coprime with $p$ then the same happens for infinitely many $p$. – reuns Dec 9 '19 at 17:33

You can prove this relatively easily for $$m=2$$.
Chose $$A_1, A_2$$ so that there exist infinitely many primes with $$q_1q_2$$ a quadratic residue and $$-A_1A_2$$ a non-residue mod $$p$$. This can be done using quadratic reciprocity and gives the primes lying in an arithmetic progression. (For example if $$p\equiv -1 \bmod 24$$ then 2 is a residue and -3 is a non residue mod $$p$$.)
Then $$p\mid(A_1q_1^n+A_2q_2^n)$$ means that $$A_1q_1^n+A_2q_2^n\equiv0 \bmod p$$ or $$A_1^2q_1^{2n}+A_1A_2{(q_1q_2)}^n\equiv0 \bmod p$$ which cannot be true if $$-A_1A_2$$ is a non residue and $$q_1q_2$$ is a residue.
Hence all such $$p$$ cannot divide $$(A_1q_1^n+A_2q_2^n)$$.
• $a \mid b$ $a \mid b$ and $a \equiv b \bmod n$ $a \equiv b \bmod n$ give better spacing than $a|b$ $a|b$ and $a \equiv b$ mod $n$ $a \equiv b$ mod $n$. I have edited accordingly. – LSpice Dec 17 '19 at 15:17