TITLE: prime dividing no term in a sequence
QUESTION [7 upvotes]: 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}$?
Any aid or answer would be welcome. Thanks in advance.

REPLY [2 votes]: 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)$.