Long primes: Difference between revisions

Line 2,582:
</pre>
===alternative version===
withthe smallest divisor d of p - 1 such that 10^d = 1 (mod p)
is the length of the period of the decimal expansion of 1/p
<lang prolog>isPrime(A):-
A1 is ceil(sqrt(A)),
51

edits