You are on page 1of 4

MTH6128 Number Theory

Solutions to Assignment 3

1 Question:

(a) Determine the continued fraction of 47.

(b) Determine the value of [4; 2, 3] = [4; 2, 3, 2, 3, 2, 3, . . .].

Solution:

(a) We run the algorithm from the lectures: Starting with x0 = 47, we get

1 6 + 47
a0 = bx0 c = 6, x1 = =
x 0 − a0 11

1 5 + 47
a1 = bx1 c = 1, x2 = =
x 1 − a1 2

1 5 + 41
a2 = bx2 c = 5, x3 = =
x 2 − a2 11
1 √
a3 = bx3 c = 1, x4 = = 6 + 47
x 3 − a3

1 6 + 47
a4 = bx4 c = 12, x5 = = = x1 .
x4 − a4 11

So the continued fraction of 41 is [6; 1, 5, 1, 12].

(b) First we evaluate [2; 3, 2] as follows. Write


1
u = [2; 3, 2] = 2 + .
3 + u1

Rearrange the above equation to get

3u2 − 6u − 2 = 0.

1
So p
u = 1 ± 5/3
p
since u > 0 we know u = 1 + 5/3. Hence,

5+ 15
[4; 2, 3] = 4 + 1/u = .
2

2 (a) For any positive integer n, show that



(i) n2 + 1 = [n; 2n]

(ii) n2 + 2 = [n; n, 2n]

(iii) n2 + 2n = [n; 1, 2n]

(Hint for part (i): Apply the continued fraction algorithm to x = n2 + 1
(so n < x < n + 1). )

(b) Use the√previous


√ √part of the√ problem to find the continued fraction expan-
sion of 2, 3, 15 and 37.
Solution: Part (a): √
(i) Using the continued fraction algorithm with x0 = n2 + 1 = a0 + t0 gives
1 √
a0 = n, = n2 + 1 + n = a1 + t1
t0
1 1 √ 1
a1 = b c = 2n, = n2 + 1 + n =
t0 t1 t0

implies a2 = a1 = 2n and t2 = t1 , hence n2 + 1 = [n; 2n].
Since t1 = t0 this √
(ii) 2
√Note n < n + 2 < n + 1. Using the continued fraction algorithm with
x0 = n2 + 2 = a0 + t0 gives

1 n2 + 2 n
a0 = n, = + = a1 + t1
t0 2 2
1 1 √
a1 = b c = n, = n2 + 2 + n
t0 t1

1 1 n2 + 2 n 1
a2 = b c = 2n, = + = ,
t1 t2 2 2 t0
The process now repeats. with t0 = t2 = t4 = · · · and subsequently t1 = t3 =
t5 = · · ·.√This implies n = a1 = a3 = a5 · · · and 2n = a2 = a4 = · · ·, respectively.
So that n2 + 2 = [n; n, 2n].

2

(iii) Note n < n2 + 2n < n + 1 (since (n + 1)√2 = n2 + 2n + 1 > n2 + 2n).
Using the continued fraction algorithm with x0 = n2 + 2n = a0 + t0 gives

1 n2 + 2n 1
a0 = n, = + = a1 + t 1
t0 2n 2
1 1 √
a1 = b c = 1, = n2 + 2n + n
t0 t1

1 1 n2 + 2n 1 1
a2 = b c = 2n, = + = ,
t1 t2 2n 2 t0

By the same reasoning as before we conclude n2 + 2n = [n; 1, 2n].
Part (b):
√ √
By part (a), (i) with n = 1, 2 = [1; 2]. By part (ii) with
√n = 1, 3 = √
[1; 1, 2]
2
(or part (iii) with n = 1). Part (iii) with√n = 3 gives 3 + 2 · 3 = 15 =
[3; 1, 6]. Finally part (i) with n = 6 implies 37 = [6; 12].

3 Question: In the lectures, we will see a proof using continued fractions of the
following theorem:

Let α be an irrational real number. Then there are infinitely many


rational numbers p/q such that

α − < 1 .
p

q q2

This exercise outlines an alternative proof. Fill in the details.

(a) Choose any positive integer n and consider the numbers xk = kα − bkαc
for k = 0, 1, 2, . . . , n.

(b) Divide the unit interval [0, 1) (closed on the left, open on the right) into n
subintervals
[0, 1/n), [1/n, 2/n), . . . , [(n − 1)/n, 1).

(c) The n + 1 numbers x0 , x1 , . . . , xn lie in these n intervals. Show that there


must be two of them, say xk and xl , which belong to the same interval,
with k > l (say). Hence |xk − xl | < 1/n.

(d) Put q = k − l. Show that qα differs from the nearest integer (say p) by less
than 1/n.

3
(e) Deduce that

α − p 1 1
< < 2.
q nq q

(f) Given any such rational approximation pi /qi for α, show that we can choose
n large enough that the rational approximation pi+1 /qi+1 produced by the
above method is different from pi /qi . Specifically, if we choose n large
enough that n > |α − pi /qi |−1 , then


α − p i+1 1 1 p i
< < < α − .
qi+1 nqi+1 n qi

(g) Conclude that we get infinitely many such rational approximations.

Solution:

The first two parts don’t actually ask you to do anything except read them!
(c) If you put n + 1 pigeons into n pigeonholes, there must be two pigeons
in the same pigeonhole. If xk and xl both lie in an interval of length 1/n, then
|xk − xl | < 1/n.
(d) xk = kα − r and xl = lα − s for some integers r, s (indeed r = bkαc and
s = blαc). So
qα = (k − l)α = (r − s) + (xk − xl ),
which is an integer plus a number whose modulus is less than 1/n. We have
p = r − s.
(e) Since |qα − p| < 1/n, dividing by q gives |α − p/q| < 1/(nq). Now
q = k − l < n, since both k and l are in the range [0, . . . , n]; so 1/(nq) < 1/q 2 .
(f) Follow the hint. Remember that n was arbitrary, so we can make it as
large as we like.
(g) Since we can always produce a new approximation with larger denomina-
tor than the largest we have produced so far, there must be infinitely many.

You might also like