<s>[INST] Prove that every integer ending in 3 or 7 has a prime factor that also ends in 3 or 7 Prove that every integer ending in 3 or 7 has a prime factor that also ends in 3 or 7.
I have that such an integer n has n=3 or 7(mod 10) but don't know where to go from there.
Then show that there are infinitely many prime numbers n with n=3 or 7 (mod 10)
 [/INST] Every prime number is congruent to $1,3,7$, or $9$ modulo $10$. Here is a a multiplication table modulo $10$
\begin{array}{c|cccc}
   \times & 1 & 3 & 7 & 9 \\
   \hline
   1 & 1 & 3 & 7 & 9 \\
   3 & 3 & 9 & 1 & 7 \\
   7 & 7 & 1 & 9 & 3 \\
   9 & 9 & 7 & 3 & 1 \\
\end{array}
Note that every integer ending in $3$ or $7$ had at least one divisor that ends in $3$ or $7$. Since a number can only have a finite number of divisors, it follows that at least one prime divisor must end in $3$ or $7$.
Since $\gcd(10,3) = \gcd(10,7) = 1$, Dirichet's theorem says that every arithmetic progression of the form $10n+3$ and $10n+7$ will contain infinitely many prime numbers.
</s>