Problem

Source: Tournament of Towns Spring 2003 - Senior O-Level - Problem 4

Tags: number theory proposed, number theory



In the sequence $00, 01, 02, 03,\ldots , 99$ the terms are rearranged so that each term is obtained from the previous one by increasing or decreasing one of its digits by $1$ (for example, $29$ can be followed by $19, 39$, or $28$, but not by $30$ or $20$). What is the maximal number of terms that could remain on their places?