## riddle of the week

**T**he Riddler of April 1 offered this simple question:

start with the number 1 and then try to reach a target number through a series of steps. For each step, you can always choose to double the number you currently have. However, if the number happens to be one (1) more than an odd multiple of 3, you can choose to “reduce” — that is, subtract 1 and then divide by 3. What is the smallest positive integer one cannot reach this way?

Which I turned into R steps (while waiting for flight AF19 to Paris)

while((!(x-1)%%3)&((x-1)%%6)){ oor[2*x]TRUE oor[x<-(x-1)%/%3]=TRUE}

but running an exhaustive search till 10⁸ did not spot any missing integer… Maybe an April fool joke (as the quick riddle was asking for the simplest representation of (x-a)(x-b)…(x-z)…!)

May 2, 2022 at 7:34 am

So am I to conclude that all integers can be reached by this procedure, that this result follows from the Collatz conjecture, and that I just wasted a dozen hours working on this riddle this last weekend? Well, the jokes on you, because I had fun!

May 2, 2022 at 4:08 pm

The joke was not mine!!!

April 22, 2022 at 12:33 am

I’m surprised you didn’t recognize it : I immediately saw it was teh Collatz Conjecture stated in reverse.

April 22, 2022 at 8:18 am

I had never heard of the Collatz conjecture to that day…!

April 21, 2022 at 4:01 pm

Inded, this was an AF riddle, with all integers less than 10⁶ attainable by this procedure.

April 21, 2022 at 8:14 am

[…] article was first published on R – Xi'an's Og, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) […]