The value will be obtained in less than 15 steps as proved so applying normal recursive operations
if ( steps < 15 ) { Transform ( sumOfDigits ( n ) , d , steps + 1 ) ; Transform ( n + d , d , steps + 1 ) ; } }