Optum interview question

Hackerrank test - friendly numbers.