Long primes: Difference between revisions
Content added Content deleted
Line 2,582: | Line 2,582: | ||
</pre> |
</pre> |
||
===alternative version=== |
===alternative version=== |
||
the 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):- |
<lang prolog>isPrime(A):- |
||
A1 is ceil(sqrt(A)), |
A1 is ceil(sqrt(A)), |