[Math] When the product of any two consecutive digits in the number is a prime number

combinatoricspermutations

I came across a question today.

The number of 10-digit numbers such that the product of any two consecutive digits in the number is a prime number, is?

As much as I know the product of any two consecutive digits is a prime number only when one of them is $1$ and the other is a prime number (unless I am missing something). But I still can't see any way forward. So, how to do this?

EDIT: The answer to this problem is

2048

Best Answer

The answer is: x1x1x1x1x1, where x can be any of: 2,3, 5, 7