# Is $7k-9$ ever a power of $2$?

I wonder if $7k-9$ is ever a power of $2$.

My work so far: if $k=2$, then $7k-9 > 4$. Then I checked if $7k-9$ is ever divisible by $4$. For $k=3$ it indeed is. For $k=4, 7k-9 > 16$. So I checked if $7k-9$ is ever divisible by $16$ and for $k= 15$ it indeed is. I could go on and try with $32$ but I don't feel inclined to do so. Is there any simpler method how to determine if $7k-9$ is ever a power of $2$?

We need $\displaystyle 2^a=7k-9$ for some integer $a\ge0$

$\displaystyle\implies 2^a\equiv-2\pmod7$

But $2^1\equiv2,2^2\equiv4\equiv-3,2^3\equiv1\pmod7$

• But doesn't $2^a \equiv -2 \pmod 7$ imply that $2^a+2$ is divisible by 7? – Adam Dec 11 '13 at 18:13
• @AhaanRungta, thanks. But, I don't subscribe to 'always':) – lab bhattacharjee Dec 11 '13 at 18:13
• @Adam, yes, what's your confusion ? – lab bhattacharjee Dec 11 '13 at 18:14
• So, since $7k-9 \equiv -2 \pmod 2$ then if $2^a = 7k-9$ then $2^a$ will also be congruent $-2 \pmod 7$, right? – Adam Dec 11 '13 at 18:19
• @Adam, $$7k-9\equiv-2\pmod7$$ – lab bhattacharjee Dec 11 '13 at 18:21

Hint $\$ If so, $\rm\ mod\ 7\!:\ \color{#C00}2^n \equiv \color{#0A0}{-2}\ \overset{cubing}\Rightarrow \color{#C00}1 \equiv \color{#0A0}{-1}\ \Rightarrow\Leftarrow$

• wow, impressive – Jonathan Dec 16 '13 at 20:16