Abstract Ghaith Hammouri University of Hartford The purpose of this paper is to demonstrate how the complex roots of unity can be used to define a sequence of functions, {Gk}, that generate periodic sequences of 0’s and 1’s. Furthermore, these functions can be summed to produce a function, S, that determines the number of factors of an integer. The functions {Gk} are applied to denote a divisor function, and finally the topic of Mersenne primes is discussed and some observations are made on the factorization of the terms of sequence 2P-1.