SMS dit: Elementary number theory with applications