Professor Moriarty has designed a "prime-testing trail" with 2002 stations, labeled from 1 to 2002. Each station is colored either red or green and contains a table indicating another station number for each digit from 0 to 9. A student, given a positive integer , walks along the trail starting at station 1. The student uses the digits of to determine the sequence of stations to visit, ending at the final station after reading all digits of .
For example, given : \begin{tabular}{c|cccccccccc} Station & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \ \hline 1 (red) & 15 & 29 & 314 & 16 & 2002 & 97 & 428 & 1613 & 91 & 24 \ & & & & & & & & & & \ 29 (red) & 98 & 331 & 1918 & 173 & 15 & 41 & 17 & 631 & 1211 & 1429 \ & & & & & & & & & & \ 1429 (green) & 7 & 18 & 31 & 43 & 216 & 1709 & 421 & 53 & 224 & 1100 \end{tabular}
Starting at station 1 and reading the digit 1 leads to station 29; station 29 and reading the digit 9 leads to station 1429, which is green.
Professor Moriarty claims the final station will be green if and only if is prime. Is this possible?