For how many positive integers n less than 100 is a multiple of 6?
Lets simplify the expression (mod6)
5nmod6≡(−1)nmod6
which is -1 when n is odd and +1 when n is even
13(n+2)≡1(n+2)≡1mod6
8(n+1)≡2(n+1)≡2∗2nmod6 14(n+3)≡2(n+3)≡8∗2n≡2∗2nmod6 8(n+1)+14(n+3)=4∗2nmod6
so
5n+8(n+1)+13(n+2)+14(n+3)mod6≡1+(−1)n+4∗2nmod6 When n is odd≡4∗2nmod6 When n is even≡2+4∗2nmod6
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