Problem

Source: 2018 USAJMO #1

Tags: USAJMO, 2018 USAJMO Problem 1



For each positive integer $n$, find the number of $n$-digit positive integers that satisfy both of the following conditions: no two consecutive digits are equal, and the last digit is a prime.