Digit switching
Source: 2018 USAJMO #1
April 18, 2018
USAJMO2018 USAJMO Problem 1
Problem Statement
For each positive integer , find the number of -digit positive integers that satisfy both of the following conditions:[*] no two consecutive digits are equal, and
[*] the last digit is a prime.