Enigma 1750: Navigating the grid
From New Scientist #2918, 25th May 2013 [link]
Using the number grid shown (A) it is possible to generate nine-digit numbers in the following way: Start on any square and then move horizontally, vertically or diagonally to an adjacent square that hasn’t already been visited. Repeat until all nine squares have been visited. For example, the path shown in diagram B generates the number 235968741.
I have listed all the numbers that can be generated in this way, and that end in a certain digit. Some of these are divisible by four (and only four) of the numbers 1 to 9. The rest are divisible by five (and only five) of the numbers 1 to 9.
How many numbers are there in my list?