1001 Problems in Classical Number Theory (Problems)
1001 Problems in Classical Number Theory (Problems)
1 and n> 1, then a=2 and n is prime, REMARK: The integers of the form 2° —1, where p is prime, are called Mersenne numbers. We denote them by My in memory of Marin Mersenne (1588-1688), who had stated that Mp is prime for p=2,8,5,7, 13,17,19,31, 67, 127,257 and composite for all the other primes p < 257. This assertion of Mersenne can be found in the preface of his book Cogita Physico-mathematica, pub- lished in Paris in 1644. Since then, we have found a few errors in the com- putations of Mersenne: indeed M, is not prime for p= 67 and p = 257, while My is prime for p = 61, p = 89 and p= 109. One can find in the appendiz C of the book of J.M. De Koninck and A. Mercier {8} the list of Mersenne primes My corresponding to the prime numbers p satisfying 2
2 such
that a” +1 is prime, then a is even and n = 2" for a certain positive
integer r,
REMank: The prime numbers of the form 2° +1, k = 0,1,2,..., are
called “Fermat primes". The reason is that Pierre de Fermnat claimed in
1640 (although saying he could not prove it} that all the numbers of the
form 2* +1 are prime. One hundred years later, Buler proved that
a
+1 = 4294967297 = 641 - 6700417.
As of today, we still do not know if, besides the cases k = 0,1,2.3,4,
primes of the form 2%" +1 exist. Nevertheless, it is known that 2° +
1 is composite for 5 < k < 32; see H.C, Williams (41] and the site
ww prothsearch.net/fermat htm,
(187) Show that the equation (2*—1)(2¥—1) = 2" +1 is impossible for positive
integers x,y and 2. (his implies in particular that a Fermat number, that
is a number of the form 2%" + 1, cannot be the product of two Mersenne
numbers.)
(188) Prove by induction that, for each integer n> 1,
FoF Pa-+ Fy
where Fi = 2° +1,i=0,1,2,
(180) Use the result of problem 188 in order to prove that ifm and m are distinct
positive integers, then (Fy, F,) = 1
(190) A positive integer n is said to be pseudoprime in basis a > 2 if it is
composite and if a”! = 1 {mod n). Find the smallest number which is
pseudoprime in each of the bases 2, 3, 5 and 7.
(191) Use Problem 189 to prove that there exist infinitely many primes.
(192) Consider the numbers f, = 2°” +1, n = 1,2,..., and show they are all
composite and in particuiar that, for each postive integer n,
(2) 3°\fni—(b) ifn Plast
(198) Show that there exist infini¢ely many prime numbers p such that the
numbers p— 2 and p-+2 are both composite,
(194) Show that 641 divides F; = 2° +1 without doing the explicit division.
(195) Use an induction argument in order to prove that each Fermat amber
Fy = 2" +1, where n > 2, ends with the digit 7.
(196) Let x be a positive integer and consider the set B= {1,2,..-yn). Let
2" be the largest power of 2 which belongs to E, Show that for all m €
B\ {2*}, we have 2* fmm. Using this result, show that S2"_, 1/7 is not an
integer if n> 1
(197) Show that, for each positive integer n, one can find a prime number p < 50
such that p|(2* ~ 1).
(198) Show that the integers defined by the sequence of munbers
Me=pipee-Pe+1 (k= 12...)(199)
(200)
(201)
(202)
(203)
(204)
1001 PROBLEMS IN CLASSICAL NUMBER THEORY
‘where p, stands for the j-th prime number, are prime numbers for 1 <
k <5 and composite numbers for k = 6,7. What about Mg, Mg and
Myo?
Use the proof of Buclid’s Theazem on the infinitude of primes to show
that, if we denote by p, the r-th prime number, then pp <2" for each
ren.
In Problem 199, we obtained an upper bound for p,, the r-th prime num
ber, namely pr < 2"""", Use this inequality to obtain a lower bound for
(2), the number of prime numbers < 2. More precisely, show that, for
223, n(z) > logtogs.
Show that there exist infinitely many prime mumnbers of the form 4n +3.
Show that there exist infinitely many prime nurubers of the form 6n +5.
Let f: N—R be the function defined by
f(a) =a," $a, 2a" +++ baie + a9,
where a, #0 and where each aj, 0 < i 2, p fa and prlja—, then p!*1 ar — OP.
(284) If pis a prime mumber, can the equation p* + 1 = 2" have solutions with
integers 6 > 2 and v > 2s?
(285) Show that the equation 1 +n +n? = m?, where m and n are positive
integers, is impossible.
(286) Show that the only solution of the equation 1 +p + p2+ p? +p! = 43,
where p and q are primes, is {p,q} = {3,11}
(287) Let 21,22,25,24 and 25 be integers such that
ataltats ede —o
Show that necessarily one of tne #18 is a multiple of 7.
(288) Show that 2? + 3” is not a power (> 1) of an integer
(289) Show that for each positive integer n
eo bah yah es" +6"
is divisible by 7 if and only if n is not divisible by 6.
(290) Is it true that if m is a positive odd integer whose last digit in decimal
representation is different from 5, then the last two digits of the decimal
representation of n*%° are 0 and 1? Explain.
(291) What are the possible values of the last digit of 4" for each m € N?
(292) Show that the difference of two consecutive cubes is never divisible by 3
nor by 5.
(293) Is it true that 27|(25+1 + 5"*2) for each integer n > 0? Explain,
(294) Show that for each positive integer k, the number (132)**? + (982)2*+!
is divisible by 37
(205) Find the last two digits of the decimal representation of 191°”
(296) Ifa and b are positive integers such that (ab,70) = 1, show that a!?—p}2
0 (anod 280).
(297) Show that for each integer n > 2, 2" —n is divisible by 2730.
(298) Find the smallest positive integer which divided by 12, by 17, by 45 ex by
70 gives in each case a remainder of 4
(299) If n is an arbitrary positive integer, is the number
Bn! 4 An $07 + 3n8 430
p is prime.
divisible by 7?
(300) Let p be prime number; stow that (2?) s 2 (mos)
(301) Show that a Sdigit positive integer whose decimal representation is of
the form “ate” (for three digits a, 6 and c) is divisible by 7 if and only if
20+ 3b-+ ¢ is divisible by 7.1001 PROBLEMS IN CLASSICAL NUMBER THEORY
(302) Show that a 6digit positive integer whose decimal representation is ofthe
form “abeabc™ (for three digits a, 6 and c) is necessarily divisible by 13.
(203) Show that 561125" — 2 and that 5619" — 3
(304) Given a positive integer n, show that
1245
35
is an integer:
(805) Does there exist @ rational number r such that for each positive integer n
relatively prime with 481,
5096
mtr
is a positive integer?
(206) Let p be an odd prime number, p # 5. Show that p divides infinitely many
integers amongst 1,11, 111, 1111,
(307) According to Fermat’s Little Theorem, ifn is an odd prime number and if
‘isa positive integer such that (a,n) = 1, then a-? = 1 (mod n). Show
that the reverse of this result is false.
(808) Let p > 3 be a prime number. Show that at? — ba” =0 (mod fp) for any
integers @ and b,
(309) If n is a positive integer, is it true that
1424B4--4(n—1) =0 (mod n)?
Explain,
(310) For which positive integers n do we have
P4243? 4.--4(n—1)2=0 (mod n)?
(311) Is it true that if n is « positive integer divisible by 4, then
PEP HS 4-4 (n—1)9 0 (mod ny?
(812) Prove that for each positive integer n, we have
5" =144n (mod 16) and 5" =1+44n+8n(n—1) (mod 64),
(813) Show that for each positive integer k > 3,
5" 21 (mod 2*) while 5% * =1 (mod 2")
More generally, show that for k > 2 and a given odd integer a, we have
a" 21 (mod 2).
(314) Show that
nn Ta
gts th
isan integer for ll w€N. More generally, show that ifp and gare rime
rumbers the
?
is an integer for all n €N.
(315) Find the solution of the congruence 2 +72 =2 (mod 13),
(816) Because of Wilson’s Theorem, the numbers 2,3,4..., 15 can be arranged
in seven pairs {1,y} such that xy = 1 (mod 17). Find these seven pairs.
gyn
q
2, Ga5, CONGRUENCES a
(B17) Let m = mymz---mp, where the m,'s are integers > 1 and pairwise
coprime. Show that
BOF) 4 GOI) mlm0/ HO) = p= (mod mn).
(318) Let p be a prime number and k an integes, 0 < k
2 and an odd integer k > 5, consider the number
* yoo"
nett peg tr tl
Prove that the number n has at least three prime factors and moreover
that they are distinct if r > 3 or ifr = 2 and k > 7.
(883) Let k be a positive integer. Show that {2* +24" 424-2 4... 49! 1}
represents the set of all positive odd numbers < 2**! — 1
(884) The number 11 is prime, while itis easy to check that the numbers 111,
1111 and 11111 are composite .
G) Show that if a number of the forma w= (10* — 1)/9is prime,
then the number k is necessarily @ prime.
(ii) Show that, if p is a prime number, then each prime factor of
(10” ~ 1)/9 is of the form 2jp + 1 for a certain positive integer j
(iii) Use a computer to find the fve smallest prime numbers p such that
the number corresponding to (10? ~ 1)/9 is prime.
(iv) Use a computer to obtain the factorization of the numbers (10°—1)/9
for each prime number p< 50.
(885) Show that each positive integer n for which there exist positive integers
kw and y such that
() nage g yet
Js composite
(886) Let n be a positive odd integer for which there exists a prime number
Py < vii such that py-n can be written as the sum of two postive cubes.
Show that n must be a composite number
(387) Consider the mimber n = 52657 403, Show that Tv can be writton as the
sum of two cubes (one of which is rather small!) and conchide that n is
composite and divisible by 719,
(888) Consider the number n = 237719.938896803. Show that In can be
written as the sum of two fifth powers (one of which i rather small!) and
conclude that n is composite and divisible by 1213.
(80) Let n > 3 be a squarefree odd composite mumber. Show that if for each
prime divisor p of n, we have p~ I) ~ 1, then er a Carmichael number6. PRIMALITY TESTS AND FACTORIZATION ALGORITHMS a
(390) Let p > 5 be a prime mumber such that 2p ~ 1 and 3p ~ 2 are primes
Show that the number n = p(2p ~ 1)(3p—2) is e Carmichael number.
(391) Use Korselt's Criterion (mentioned in the remark on the solution of Prob-
Jem 389) in order to prove that each Carmichael number must have at
Teast three distinct prime factors.
(392) In the remark attached to the solution of Problem 389, we observed that
aan integer n= qgz---gx, where k > 3 and 2 < gr < qr <... < ge are
prime numbers, is # Carmichael number if and only if
O) a-\[Ja-1 G=1.2..-,4).
Show that condition (+) can be replaced by the condition
g-M[Ta-1 G=1,3...4)
(393) Observing that
(+) 327763
find the factorization of 327 763.
(304) Searching for a prime factor of n
Ton = 301 592611 = 699? +84
+ 679 = 519 + 58%,
48790373, we observe that
Use this information to obtain the factorization of n.
(395) In 1956, Paul Erdés raised the question of obtaining the value of the
smallest integer n > 3 such that 2” —7 is prime. Use a computer to find
‘this number n as well as the five next numbers n with the same property.
Show that, in this search, one may ignore even integers n, the integers
‘n= 1 (mod 4), the integers n = 7 (mod 10) as well as the integers n = 13
(mod 12)
(396) Let a > 2 be an integer and let p be a prime number such that p does not
divide a(a? 1). Show that the number
ry
"@-1
is pseudoprime in basis a, Use this method to find pseudoprimes in basis
2and 3,
(892) Show that there exist infinitely many pseudoprimes in basis 2
(308) Let a and m be two positive integers such that (a, m) = 1. We say that s
is the order of a modulo m ifs is the smallest positive Integer such thet
‘a! = 1 (mod m). Show that if a" = 1 (mod m), then sin.
(899) (Lucas’ Test) Let n > 3 be an integer such that for each prime factor
a of n—1 there exists an integer a > 1 such that a"! = 1 (mod n) and
ai™-1/4 £4 (mod n). Show that n is prime,
(400) Let m = 10"? +61. First verify that 2-5 - 3847 12667849 is indeed the
factorization of n—1, and then use Lucas’ Test, explained in Problem 399
(with an appropriate choice of a), to show that n is prime.1001 PROBLEMS IN CLASSICAL NUMBER THEORY
(401) Use the primality test of Lucas, explained in Problem 309, to prove that
the numbers n =r! +1, where r takes successively the values 1910, 1916
and 1926, are all primes.
(402) Let n = 10"? +63. Verify that » — 1 = 2-3?-7-47- 168861871, and then
use Lucas’ Test, explained in Problem 399 (with an appropriate choice of
4), to show that m is prime.
(403) (PoLLARD p—1 FACTORIZATION METHOD) Let n be a positive integer.
Assume that n has an odd prime factor p such that p~ 1 has all its prime
factors < k, where k is a relatively small positive integer (such as k = 100
‘ot 1000 or 10000), 50 that (p—I)[k!. Let m be the residue modtato n of
2 and let g = (m—1,n). Show that g > {, thus identifying a factor of
(404) Use the Pollard p — 1 factorization method to find the smallest prime
factor of the Fermat mutnber Fy = 2" +1
(405) Use the Pollard p— I factorization method and a computer to factor the
number 252123019542987435003029,
(406) Use the Pollard p—1 factorization method and a computer to obtain the
three prime factors of the Mersenne number
27¥ — 1 = 2361183241434822606847.
(407) Use the Pollard p— 1 factorization method and a computer to factor the
number 136258390321.
(408) Let n = 302446877. Let m be the quantity 2°" modulo m. Show that
4g = (m— yn) = 17389. Use the Pollard p ~ 1 factorization metiod to
conclude that 17389 is a (prime) divisor of 302446 877,
(409) Show that each prime factor p of the Fermat number F,, = 22” +1 with.
> Zis of the form p=k-2"?+1,keEN
(410) Use the result of Problem 409 in order to prove that 641 is a prime factor
of Fs = 2" +1 = 4204967297.
(411) Use the result of Problem 409 in order to prove that 2741177 is a prime
factor of
y= 2 + 1 = 18446 744073709551 617
(412) (Papa's Test) Let Fy = 2" +1 be a Fermat number and let k > 2 be
‘an integer. Show that, for n > 2,
k
Pea ant (4)
1 ek 2-1 (mod FR).1. mwreceR pars ”
7. Integer Parts
(413) Let a, € R. Show that
(a) [al + [8] + [a +5] < [2a) + [28];
(b) [a] + [8] + 2[a + 8) < [Sa] + [33s
() (al + (61+ 3la + Bl < [4a] + (45)
(d) 2[a] + 2/8] + 2[a + 5) < [4a] + (43);
(©) Slo] + 315} + [a +) < [4a] + [48
(414) Show that oat is an even integer for each n € N.
(415) Let myn € N, Show that:
2mm)!
(a) —2MCMN 5 an integer; (b)
(am)\(an)!
malnl(m + n}l ~ msg
aint(mem
1,2,--+.7 be integers such that a1 + a2 +--+ ay
(86) Let a, > 9,
Sow that Ff an integer.
(417) How many zeros appear at the end of the decimal representation of 231?
(418) Show that the last digit of n! which is different from 0 is always an even
number provided n > 5
(419) Find all positive integers n for which the number of zeros appearing at
the end of the decimal representation of n! is 57. What happens when the
number of zeros is 60 oF 61?
(420) Let n be a positive integer.
(a) Show that the largest integer a such that 5* divides (5" — 3)! is
58 —4n
4
(b) Let p be a prime number and i a positive integer smaller than p.
Show that the largest integer such that p* divides (p™ — is
ph —(p~1)n—1
pot
(421) Let n be a positive integer. Pind a fortaula which reveals explicitly, for a
«given prime number p, the unique value of «such that
Tle.
(422) Let n be a positive integer. Find a formula which reveals explicitly, for a
given prime number p, the unique value of a sueh that
ye | He »
and use this to show that, “
2 (Fe ]-@)
(423) Find all natural numbers n having the property that [Vii] is a divisor of,
oso 1001 PROBLEMS IN CLASSICAL NUMBER THEORY
(424) Prove that for each integer n > 1,
[vn + veo] = (VinFI] = [VinF3] = [Vin 3).
(425) Prove that for each integer n >
[va+ Vari + vat] = [VORFR].
(426) Let m and k be positive integers, Show that
mk m+1\) ,
Fetters
0 fzER\Q,
1 ifzeQ,
(427) Show that
«lim_foos?(m!2)] = {
where [y) stands for the largest integer smaller or equal to y, and thus
establish that the function f :R~+ {0,1} defined by
Ja) = lim {oos?(mtn2)]
represents the characteristic function of the rational numbers
(428) Show that, for each positive integer n,
ES}RE Eel Se
(429) Show that for each m € Z,
par]-
does not depend on m.
(431) Given an integer n > 2, show hat, for each positive integer k