Problem

Source: Brazil National Olympiad 2019 - level 2 - #1

Tags: Brazilian Math Olympiad, Digits, number theory



An eight-digit number is said to be 'robust' if it meets both of the following conditions: (i) None of its digits is $0$. (ii) The difference between two consecutive digits is $4$ or $5$. Answer the following questions: (a) How many are robust numbers? (b) A robust number is said to be 'super robust' if all of its digits are distinct. Calculate the sum of all the super robust numbers.