Optical Coding Theory with Prime