Number-Theory-Inspired Effects in Cold Atoms