That doesn't work, because you are proving that if is multiple of 24, then n is not multiple of 3. That doesn't prove that the assertion is true, there could be no such integers 'n'.

First note that: so we'll prove that (1) and (2)

(2) Follows easily from Fermat's Little Theorem since , or you can check the 2 possible cases

(1) We have: , but since is odd, then either or so either or is multiple of 4, but both are even, thus the product must be multiple of 8, since one is multiple of 4 and the other even.