I started drawing circles of points on a papper and I reached to this values:
total safe 2 1 3 3 4 1 5 3 6 5 7 7 8 1 9 3 10 5 11 7 12 9 13 11 14 13 15 15 16 1
And I realized that it increases in a base 2 pattern. I tried some math unsuccessfully.
So I had an idea!
Lets Google it....
In my research I found a guy named Josephus who thought about this problem and in a formula:
f(n) = 2*(n - 2^floor(log_2(n)) ) + 1
=)
There was a page of A Thinking Ape: https://arrenyu.wordpress.com/2014/05/09/a-thinking-ape-puzzle-challenge/

Log in or sign up for Devpost to join the conversation.