92 History of the Theory of Numbers. [Chap, hi 
divisible by n. From this fact Leibniz concluded erroneously that the 
expression itself is not divisible by n. 
Chr. Goldbach^^° stated that {a-\-by — a^ — b^ is divisible by p also when 
p is any composite number. Euler (p. 124) points out the error by noting 
that 2^^ — 2 is divisible by neither 5 nor 7. 
In 1769 J. H. Lambert^'* (p. 112) proved that, if ^"•-l is divisible by a, 
and d" — 1 by 6, where a, b are relatively prime, then d' — l is divisible by 
ab if c is the 1. c. m. of m, n (since divisible by d"* — 1 and hence by a) . This 
was used to prove that if g is odd [and prime to 5] and if the decimal fraction 
for l/g has a period oi g — 1 terms, then ^ is a prime. For, if ^ = a6 [where 
a, b are relatively prime integers > 1], 1/a has a period of m terms, m^a — \, 
and 1/6 a period of n terms, n^b — l, so that the number of terms in the 
period for 1/^ is ^ (a — 1)(6 — 1)/2<(7 — 1. Thus Lambert knew at least 
the case /c = 10 of the converse of Fermat's theorem (Lucas^"' ^^'). 
An anonymous writer ^^^ stated that 2n+l is or is not a prime according 
as one of the numbers 2"=*= 1 is or is not divisible by n. F. Sarrus^^^ noted 
the falsity of this assertion since 2^'^° — 1 is divisible by the composite num- 
ber 341. 
In 1830 an anonymous writer^ noted that a"~^ — 1 may be divisible by n 
when n is composite. In a^~^ = /cp+1, where p is a prime, set k = \q. Then 
^(P-i)«=l (jjjojj pqy Ti^us oP«-i = l if a«-i = l (mod pq), and the last will 
hold if g — 1 is a multiple of p — 1 ; for example, ifp = ll,g' = 31,a = 2, whence 
2340=1 (mod 341). 
V. Bouniakowsky^^3 proved that if A^ is a product of two primes and if 
iV— 1 is divisible by the least positive integer a for which 2"=1, whence 
2^~^=1 (mod N), then each of the two primes decreased by unity is divisible 
by a. He noted that 3^=1 (mod 91 = 7-13). 
E. Lucas^^^ noted that 2''~^=1 (mod n) for 71 = 37-73 and stated the true 
converse to Fermat's theorem: If a"" — ! is divisible by p for x = p — l, but 
not for x<p — lf then p is a prime. 
F. Proth^^* stated that, when a is prime to n, n is a prime if a*= 1 (mod n) 
for a:= (n — 1)/2, but for no other divisor of (n — 1)/2; also, if a''=l (mod n) 
for x = n — l, but for no divisor <\/n of n — 1. If 71 = 7^-2*^+1, where m 
is odd and < 2*", and if a is a quadratic non-residue of n, then n is a prime 
if and only if a^"~^^/^= — 1 (mod n). If p is a prime >^\/n, n = mp+l is a 
prime if a"~^ — 1 is divisible by n, but a^'^l is not. 
*F. Thaarup^^' showed how to use a"~^=l (mod ti) to tell if n is prime. 
E. Lucas^^^ proved the converse of Fermat's theorem: If a^=l (mod ti) 
for a: = 71 — 1, but not for x a proper divisor oi n — 1, then n is a prime. 
""Corresp. Math. Phys. (ed. Fuss), I, 1843, 122, letter to Euler, Apr. 12, 1742. 
"'Annales de Math. (ed. Gergonne), 9, 1818-9, 320. 
^"Ibid., 10, 1819-20, 184-7. 
"»M6m. Ac. Sc. St. P6tersbourg (math.), (6), 2, 1841 (1839), 447-69; extract in Bulletin, 6, 97-8. 
"*Assoc. frang. avanc. sc, 5, 1876, 61; 6, 1877, 161-2; Amer. Jour. Math., 1, 1878, 302. 
"'Comptes Rendus Paris, 87, 1878, 926. 
"•Nyt Tidsskr. for Mat., 2A, 1891, 49-52. 
*"Th6orie des nombres, 1891, 423, 441. 
