Skip to main content

GRiddles Series B: Puzzle 4

View the full series
Ribbed panels undulate and twist across the frame casting layered shadows in a high contrast monochrome composition forming flowing architectural waves

Code mode

Let be a non-negative integer. Ana and Bob play a game. To start, Bob publicly chooses a sequence (an)n=1∞    containing every positive integer exactly once, and sets his starting passcode to 0. On each turn n = 1, 2, 3, . . . , the following happens in order:

  1. Bob updates his passcode by adding an to it or subtracting an from it. The new passcode must be a positive integer not used as a passcode before. If no valid move is possible, Ana wins.
  2. If n > 202620262026, Ana gets up to guesses for Bob’s passcode this turn. She cannot repeat a guess across the entire game. If a guess is correct, she wins.

If the game goes on forever, Bob wins if every positive integer eventually appears as his passcode. Otherwise, Ana wins. Find the smallest value of for which Ana has a winning strategy.

Answer format: State the smallest value of for which Ana has a winning strategy, and prove it.

Submit your answer here!

Please note that only your first submission will be considered.

Enjoyed the challenge?

The curiosity and problem-solving mindset behind GRiddles are the same qualities that drive our research and engineering teams every day.

Explore opportunities to join us.

Shiny black fluid flowing in smooth folds across a reflective gray surface suggesting liquid metal or oil in soft motion

Stay up to date with G-Research

Join our talent network

Be the first to hear about new roles and opportunites to join our team.