# Turn a power of $2$ into a multiple of $7$, maybe adding a $2$ but not a $7$

On St. Patrick's Day, the Lucky Charms leprechaun wagered me a bottle of Glenfiddich I couldn't solve this math problem before midnight:

There is a power of $2$ that can be turned into a multiple of $7$ with a simple rotation of a representation. Furthermore, that same power of $2$ can be turned into that same multiple of $7$ by adding a $+2$ to another representation. And if you really want to use a $7$ to get there, that can also be done, but you need a couple more things besides the $+2$ to accomplish the transformation.

I immediately said $1024$, since $2401 = 7^4$, but he said that's wrong, because that requires a rotation and a swap. "Think easier, lad," he said.

Midnight came and went and I didn't figure it out. But I still want to know the answer. I know it's something so easy I will feel stupid once the answer is revealed to me. The answer doesn't require heavy duty number crunching. I've been looking at the powers of $2$ up to $2^{64}$ but I can't figure it out. This riddle has me stumped.

• Just one question. Why is the Lucky Charms leprechaun wagering a bottle of scotch?!? That should be a bottle of Jameson's! Mar 19 '15 at 21:19
• I don't know, I had to make do with PBR that day. Mar 19 '15 at 21:21
• @TimRaczkowski - Jameson's is best drunk straight, whereas everyone knows that Glenfiddich is best when used to hydrate your magically delicious marshmallows. Mar 19 '15 at 21:21
• Do the rotated numbers have to symmetric or look exactly like another number when rotated? i.e. Can the numbers 2,3,4,5,7 be used in a rotation? 32 works for the first case ($6+8+18$ rotated given $9+81+8=98=2 \cdot 7^2$) and the last ($32 = 4+28$, involve a 7 by multiplying 4 by 7. Next write $28=3 \times 6 +7$ now do $7^{+2}$ to get $4(7) + 3(6) + 7^2=98$. It also works for the second $32=33(1) -1$. Now add a +2; $33(1+2) -1=98$. Not sure if all these are valid tools but it's the best thing I could come up with in a couple of minutes. Mar 20 '15 at 0:26
• FWIW, $2^{15}=32768$, and $86723$ is a multiple of $7$. This is the smallest power of $2$ for which this happens. Mar 20 '15 at 22:00

## 5 Answers

A possible answer: $2^0$

Rotation: $2^0=1$ but $0^2 = 0$. $0$ is a multiple of $7$.

+2: $2^0$ can be represented by $\frac {-2}{-2}$. Add 2: $\frac {-2+2}{-2} = 0$

7: This one I'm not quite sure about. You could just do the same thing as above and represent $2^0$ by $\frac {-7}{-7}$ and all you'd need is a $+7$ on top, but the riddle says you need other stuff than the 7 to make the transformation.

$2^8=128$ and $812=7\cdot 116$ but that doesn't satisfy the second condition as far as I can see.

• Also, that's a rotation and a swap. 128 rotated would be 821, not 812. Mar 21 '15 at 2:35
• I may be misunderstanding what is meant by rotation. I "rotated" the $8$ in front of the $1$. Rotation is not well defined here. Mar 21 '15 at 2:38

Hmm, those leprechauns are tricky...

Perhaps we need to rotate $16$ to get that multiple of 7, $91$. I can't get the rest of it to make sense, though - I tried working through other bases, no joy yet - I would have expected him to allude to going from $31_5$ to $331_5$, because they're very fond of dublin'.

The first thing that popped into my mind was bitwise rotation, like ROR, ROL, RCR, etc. But obviously a power of 2 in an integer data type rotated in whatever direction whatever number of bits simply gives another power of 2.

Your failed answer of 1024 and 2401 suggested to me that the answer involves a rotation of decimal digits, which after some head-scratching led me to this: $$2^{14} = 16384$$ and $$14^4 = 38416.$$

If we take $2^{14}$ and "flip" it we get $14^2 = 196$, which falls short of 38416. Maybe this is where the "$+2$" comes in: $14^{2 + 2} = 38416$. One way to use a digit 7 in the representation of $2^{14}$ is $(2^7)^2$. More changes are required to turn that into $14^2$, namely $(2 \times 7)^{2 + 2}$.

I don't read Chinese, but this webpage helped me figure things out http://wenwen.sogou.com/z/q469682270.htm

It's still possible to make $1024$ work. Do $4102 = 7 \times 586$. Now, $1024 = 4^{9 - (3 + 1)}$ and $4102 = 14 \times 293$. What I did there was rearrange the digits and move a $2$ in there, and replace the various operators with a single $\times$ sign. I doubt this would've won you the Glenfiddich, however.