Triggered by the need for arrays of individually resolvable excitation foci or trapping potentials in photonics applications, coherent lattice theory describes a unique approach to design structured interference patterns. Typically, large periodicity lattices remain unexplored due to limitations in the theoretical description. Here, we present a method for efficient computation of coherent lattices, successfully covering all periodic and quasi-periodic lattices. The previously unrelated moiré theory and prime number factorization are the foundation of the proposed method. Additionally, we experimentally verify key optical coherent lattices and propose broadening their applicability towards structured light microscopy and optical trapping using photonic integrated circuits.