n -> (sum of digits (n^2) ) + 1, repeat
Source: Portugal OPM 1999 p4
May 18, 2024
number theorysum of digits
Problem Statement
Given a number, we calculate its square and add to the sum of the digits in this square, obtaining a new number. If we start with the number we will obtain, in the first step, the number , since . What number will we obtain in the th step?