Determine all positive integers relatively prime to all the terms of the infinite sequence
$$a_n = 2^n + 3^n + 6^n − 1, n ≥ 1.$$
Determine all positive integers relatively prime to all the terms of the infinite sequence
$$a_n = 2^n + 3^n + 6^n − 1, n ≥ 1.$$
This is an old International Mathematical Olympiad problem. Show that $p \mid 2^{p-2} + 3^{p-2} + 6^{p-2} - 1$ for all primes $p\ge 5$ by using Fermat's Little Theorem. Hence the only solution is $1$, as $(a_1,2) = 2$ and $(a_2,3) = 3$
If p>3 then, $2^{p-2}+3^{p-2}+6^{p-2}\equiv 1\mod p$. Now, multiply both the sides by 6 to get: $$3 · 2^{p−1} + 2 · 3^{p−1} + 6^{p−1} ≡ 6 \mod p$$
this is clearly a consequence of Fermat’s little theorem. Therefore p divides $a_{p−2}$. Also, 2|$a_1$ and 3|$a_2$. So, there is no number other than 1 that is relatively prime to all the terms in the sequence.
Second approach similar to the above one.
Trivially, $a_2 = 48$ is divisible by 2 and 3.Therefore, Let p > 3 be a prime number. Then $$6a_{p−2} = 3 · 2^{p−1} + 2 · 3^{p−1} + 6^{p−1} − 6 ≡ 3 + 2 + 1 − 6 ≡ 0\mod p$$ And so the only such number is 1. Proved.