I noticed that several of my old credit cards have verification codes which have an interesting property which I'll call "numpathable".
A numpad is a graph that looks like this:
7 - 8 - 9
| | |
4 - 5 - 6
| | |
1 - 2 - 3
A number $n$ is a numpad path (or numpath, if you like) if its digits can be produced by moving along the edges of this graph, with at most one edge in between consecutive digits in $n$.
For example, $4556$ is a numpad path, as are $1$, $12$, and $123$ and $12321$. $987456321$ is the largest number that's a numpad path without repeating any digits.
However $4553$ isn't a numpad path, because you must traverse more than one edge between $5$ and $3$. $1234$ is also not a numpad path for the same reason. Similarly, any number containing $0$ isn't a numpad path since $0$ doesn't appear on this graph.
Q: What is the probability $P(d)$ that a random $d$-digit number ($d > 0$) is a numpad path? (Clearly, all 1 digit-numbers except 0 are numpad paths, so $P(1) = 0.9$.)
Edit: I previously called these "numpad tours", but a commenter pointed out that tours typically touch every node in a graph, so I've renamed it to numpad paths.