JOURNAL OF INTEGER SEQUENCES, cilt.21, sa.6, 2018 (ESCI)
We give another proof of the Lucas-Lehmer test by using a singular cubic curve. We also illustrate a practical way to choose a starting term for the Lucas-Lehmer-Riesel test by trial and error. Moreover, we provide a nondeterministic test for determining the primality of integers of the form N = hp(n) - 1 for any odd prime p. We achieve these by using the group structure on a singular cubic curve induced from the group law of elliptic curves.