Show that there are infinitely many prime numbers ending in 3 or 7 (when written in decimal) I have been struggling with this problem. I have already shown that every integer ending in $3$ or $7$ (when written in decimal) has a prime factor which also ends in $3$ or $7$ (using $n = 3$ or $7$ (mod $10$)).
I assume that I need to use this fact to show that there are infinitely many primes ending in $3$ or $7$ but not sure where to begin?
Many thanks
 A: Here's a proof using the Chinese remainder theorem.
Assume there are only finitely many primes ending with $3$ or $7$. Denote them as $p_1,p_2,\ldots,p_n$. Now, numbers $p_i$ together with number $10$ are pairwise coprime. Therefore, there exists a natural number $N$ such that $N \equiv 1 \mod p_i$ for every $i$, and $N \equiv 3 \mod 10$. This $N$ doesn't have any prime factors ending with $3$ or $7$, which contradicts the statement in the beginning of your question that you have already proved.
A: Assume that $p_1=3,p_2=7,p_3,\ldots p_n$ is the list of all the primes that end in $3$ or $7$.  Consider the product $P=\prod_{i=1}^{n}p_i$, which must end in $1,3,7,$ or $9$.  If it ends in $3$ or $9$, let $Q=P+4$; if it ends in $1$, let $Q=P+2$; if it ends in $7$, let $Q=P+10$.  Then $Q$ ends in $3$ or $7$ and is not divisible by any of the primes in the list $p_1,p_2,\ldots,p_n$.  It is either a new prime (ending in $3$ or $7$), or else it has a new prime factor (ending in $3$ or $7$); either case contradicts the assumption that the initial list was exhaustive.  We conclude that the number of such primes must be infinite.
