I'm trying to understand how to create a DFA on the language $\{a,b\}$ that accepts strings where the number of $a$s is not a multiple of n.Creating a DFA with no. of $a$s divisible by $n$ is easy. One simply makes $n$ states such that the string ends into the accept state per every $n$ of e.g. $a$s.I've figured that the set of natural numbers not divisible by $n$ can be found by considering all $k$ such that $k=nm+j$, $0j<n$.I haven't been able to figure how to translate this to a DFA. It's implicative that not divisible is a complement of divisible.
DFA complement: DFA on $\{a,b\}$ that accepts string where the numbers of $a$s not multiple of n
finite automata