Help plz with counting
Find the number of ways of arranging the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 in a row so that the product of any two adjacent numbers is even or a mutliple of 3
(1,5), (5,1), (1,7), (7,1), (5,7), (7,5) ==6 - any of these 6 pairs included in 10! permutations must be removed.
10! - [9! * 6] + [8! * 6] ==1,693,440 - total number of ways or permutations.