For how many positive integers n less than 100 is a multiple of 6?
Lets simplify the expression (mod6)
\(5^n\mod6\\ \equiv(-1)^n\mod6\\ \)
which is -1 when n is odd and +1 when n is even
\(13^{(n+2)}\equiv 1^{(n+2)}\equiv1\mod6\)
\(8^{(n+1)}\equiv 2^{(n+1)}\equiv2*2^n\mod6\\~\\ 14^{(n+3)}\equiv 2^{(n+3)}\equiv8*2^n\equiv2*2^n\mod6\\~\\ 8^{(n+1)}+14^{(n+3)}=4*2^n\mod6\\~\\ \)
so
\(5^n + 8^{(n + 1)} + 13^{(n + 2)} + 14^{(n + 3)}\mod6 \\ \equiv 1+ (-1)^n+4*2^n \mod6\\~\\ \text{When n is odd}\equiv 4*2^n \mod6\\~\\ \text{When n is even}\equiv 2+4*2^n \mod6\\~\\ \)
consider 4*2^n
n | 1 | 3 | 5 | 7 | 2 | 4 | 6 | 6 | |
4*2^n | 8 | 32 | 128 | 512 | 16 | 64 | 256 | 1024 | |
4*2^n mod6 | 2 | 2 | 2 | 2 | 4 | 4 | 4 | 4 | |
2+4*2^n mod6 (even only) | 0 | 0 | 0 | 0 |
So that expression is a multiple of 6 for all even values of n. So that is 49 values, 2 to 98 inclusive