If the puzzle were for 1-digit numbers, the answer would be 5, as there'd be one such number for each of the 5 allowable digits.

If we want to keep track of what the answers would be for increasing numbers of digits in the integers in question, we can do that by keeping separate counts for integers ending in each of the five particular digits that such integers can end in. An n-digit integer can end in a 1 as often as an (n-1)-digit number can end in a 3. An n-digit number can end in a 3 as often as an (n-1)-digit number can end in either a 1 or a 5, and so forth.