Using the digits 0, 1, 2, 3, 4, find the number of ten-digit sequences for which the difference between any two consecutive digits is 1.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Call the numbers with 0, 1, 2, 3, 4 with difference between consecutive digits 1, as good numbers.
Let A n denote the number of good n-digit sequences that end in either 0 or 4; let B n denote the number of good n-digit sequences that end in either 1 or 3; and let C n denote the number of good n-digit sequences that end in 2. Then for non-negative integers n:
Hence B n + 1 = 3 B n − 1 for n>1. It is easy to see that B 1 = 2 and B 2 = 4. Hence B 2 n + 1 = 2 . 3 n and B 2 n = 4 . 3 n − 1 .
It follows that there are A 1 0 + B 1 0 + C 1 0 = 2 B 9 + B 1 0 = 4 . 3 4 + 4 . 3 4 = 6 4 8 good ten-digit sequences. .