Copyright © University of Cambridge. All rights reserved.

How many $2010$ digit numbers are there in which every pair of consecutive digits forms a two digit number that is divisible by $17$ or $23$?

If you liked this problem, here is an NRICH task which challenges you to use similar mathematical ideas.

*This problem is taken from the UKMT Mathematical Challenges.**View the archive of all weekly problems grouped by curriculum topic*