For any positive integer $k$ let $f_1(k)$ denote the sum of the squares of the digits of $k$ (when written in decimal), and for $n \ge 2$ define $f_n(k)$ iteratively by $f_n(k)=f_1(f_{n-1}(k))$.

Find $f_{2017}(2016)$.

Excel in math and science

Master concepts by solving fun, challenging problems.

It's hard to learn from lectures and videos

Learn more effectively through short, interactive explorations.

Used and loved by over 8 million people

Learn from a vibrant community of students and enthusiasts,
including olympiad champions, researchers, and professionals.

Your answer seems reasonable.
Find out if you're right!