Approach hintTry it first, then revealHide
Express the rank of a lucky number through the rank of the number without its last digit: every lucky prefix has exactly two extensions, one ending in 4 and one in 7, in that order.
Express the rank of a lucky number through the rank of the number without its last digit: every lucky prefix has exactly two extensions, one ending in 4 and one in 7, in that order.