Problem

Source: Benelux Mathematical Olympiad 2012

Tags: floor function, arithmetic sequence, number theory proposed, number theory



A sequence $a_1,a_2,\ldots ,a_n,\ldots$ of natural numbers is defined by the rule \[a_{n+1}=a_n+b_n\ (n=1,2,\ldots)\] where $b_n$ is the last digit of $a_n$. Prove that such a sequence contains infinitely many powers of $2$ if and only if $a_1$ is not divisible by $5$.