Its pretty late, and I haven't really thought it all the way through but since 12 is the lcm of 3 and 4. Maybe you could convert the entire thing to mod 12.

Then build a relation table for a and b mod 12. Using a computer program you might be able to handle all the permutations, to find out what possible values n can hold mod 12. Of course you are expecting to see:

which then proves that: