Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 2.4.3 (Composite repunits)
Exercise 2.4.3 (Composite repunits)
- (a)
- Let . Show that . Deduce that is composite.
- (b)
- Let . Show that . Deduce that is composite.
- (c)
- Let . Show that . Deduce that is composite.
- (d)
- Let . Show that ). Deduce that is composite.
Answers
Proof. Note that, if is prime, then is prime (why?). The converse is false, as the following counterexamples show it.
- a)
-
Applying the algorithm of fast exponentiation (and the Python program) given in problem 2, we obtain for
,
If was prime, we would obtain by Fermat’s theorem . This is false, so is composite.
- b)
-
If
, then
so is composite.
- c)
-
If
, then
so is composite.
- d)
-
If
, then
so is composite.
ipython:
In [13]: m = 1111111111111 In [14]: powermod(2,m-1,m) Out[14]: 1015669396877