0% found this document useful (0 votes)
25 views6 pages

Handout 3980 3656

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views6 pages

Handout 3980 3656

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ORMC AMC 10/12 Training Week 5

Number Theory II

April 30, 2023

1 Warm-Up
These problems should be a review of linear diophantine equations and the Chicken McNugget theorem
along with other basic concepts.

1. Prove that if gcd(a1 , . . . , an ) = 1, then every sufficiently large positive integer can be represented as a
non-negative integer linear combination of the ai .

2. Solve the Diophantine equation x − y 4 = 4, where x is a prime.

3. Find the largest integer N such that no combination of coins worth 3, 10, 12 is worth exactly N units.

4. (HMMT) Compute the number of positive integers n ≤ 1000 such that lcm(n, 9) is a perfect square.
(Recall that lcm denotes the least common multiple.)

5. (Indian Math Olympiad) For each positive integer n, let s(n) denote the number of ordered pairs
(x, y) of positive integers for which
1 1
+ = n.
x y
Find all positive integers n for which s(n) = 5.

6. (Polish Math Olympiad) Solve the following equation in integers x, y:

x2 (y − 1) + y 2 (x − 1) = 1.

1
2 Continued Fractions
Definition 1. A (simple) continued fraction is an expression of the form

1
a0 +
1
a1 +
1
a2 +
a3 + . . .
where ai are non-negative integers for i > 0 and a0 can be any integer. Since the above expression can be
unwieldy, we can represent it in list notation as [a0 , a1 , a2 , a3 , . . . ]. A finite continued fraction is one which
has finitely many terms.
a
Theorem 1. Every rational number b can be represented as a finite continued fraction.
Proof. Applying the Euclidean algorithm on a and b gives us the following system of equations:

a = q0 b + r0
b = q1 r0 + r1
r0 = q2 r1 + r2
r1 = q3 r2 + r3
..
.
rn−1 = qn+1 rn + 0.
a
Let [c0 , c1 , c2 , . . . ] denote
  a continued fraction representation for b. Note that by definition of the division
algorithm, r0 < b so ab = q0 = c0 . We are left with

a 1
− c0 =
b 1
c1 +
1
c2 +
c3 + . . .
Thus,
a −1 1
− c0 = c1 +
b 1
c2 +
c3 + . . .
But
a a − bq0 r0
− c0 = = .
b b b
r0
Thus we have shown that b = [c1 , c2 , . . . ], and repeating the earlier argument shows c1 = q1 . Using
induction, it is clear that ci = qi for all i ≥ 0. Since the Euclidean algorithm terminates in a finite number
of steps, it follows that every rational number has a finite continued fraction representation.
hn
Definition 2. Given a continued fraction [a0 , a1 , . . . ], the n-th convergent is defined to be kn = [a0 , a1 , . . . , an ].
For instance, in the above example, the first few convergents are:
h0
= c0
k0
h1 1
= c0 +
k1 c1
h2 1
= c0 +
k2 1
c1 +
c2

2
Theorem 2. Let xn = hknn denote the n-th convergent. Then the even convergents x2n increase strictly with
n, while the odd convergents x2n+1 decrease strictly.
Proof. We have that
hn hn−2
xn − xn−2 = −
kn kn−2
hn hn−1 hn−1 hn−2
= − + −
kn kn−1 kn−1 kn−2
n−1 n−2
(−1) (−1)
= +
kn kn−1 kn−1 kn−2
(−1)n (kn − kn−2 )
=
kn kn−2 kn−1
(−1)n an kn−1
=
kn kn−2 kn−1
(−1)n an
=
kn kn−2

This expression has the sign (−1)n , which is positive when n is even and negative when n is odd. Thus,
x2n < x2n+2 and x2n−1 > x2n+1 .

3
2.1 Examples
1. Evaluate [1, 1, 1] and [1, 1, 1, . . . ].

√ √
2. Find continued fractions for 2 and 3 to the third convergent.

3. Evaluate
1
2+
1
1+
1
2+
1 + ...

2.2 Exercises

1. Find the periodic continued fraction for a2 + 1.


2. (AHSME) Solve 5 − x = 5 − x2 . (Hint: don’t try to solve the quartic equation.)


3. Show that |x − y d| < 1 is satisfied by an infinite number of pairs of positive integers (x,y).

4. Find the continued fractions for 100 27


27 and 100 . In general, let x = [a0 , . . . , an ] and 1/x = [b0 , . . . , bm ].
What can we conclude about the relationship between ai and bi ?

4
3 Pell’s Equation
Last class, we dealt with a general class of equations called linear diophantine equations. Oftentimes, the
equations we encounter are not so simple and may contain terms of higher degree. For instance, consider
the quadratic diophantine equation ax2 + by 2 = c.
The special case when a = 1, b < 0, c = 1 is known as Pell’s Equation:

x2 − ny 2 = 1.

Theorem 3. The equation x2 − ny 2 = 1 has a non-trivial solution if and only if n is not a square. If n is
not a square, then infinite solutions can be generated by the fundamental solution (x1 , y1 ), the solution with
the smallest value of x and y.

3.1 Proof (Exercises)


1. Show that if n is a square then the equation x2 − ny 2 = 1 has only the trivial solution x = 1 and y = 0.

2 2
√ Show that if (x, y) is a solution to x − ny = 1, then the
2. Assume henceforth that n is a non-square.
x
fraction y is a close approximation for n.


3. Let hkii denote the i-th convergent of the continued fraction representation for n. Then there exists
an i ∈ N such that x1 = hi and y1 = ki . That is, the fundamental solution can always be found by
testing convergents until a solution is found. The proof for this statement is out of the scope for this
lecture but will be assumed to be true. Using this method, find the fundamental solutions for n = 2
and n = 3.

4. Show that if (x, y) and (a, b) are two solutions to Pell’s equation, then (xa + nyb, xb + ya) is a third
solution.

√ √
5. For all k > 1, define (xk , yk ) := xk + yk n = (x1 + y1 n)k . Show that (xk , yk ) is a solution to
2 2
x − ny = 1. We say that (xk , yk ) is generated by (x1 , y1 ).

6. Show that all solutions are generated by the fundamental solution (x1 , y1 ).

5
3.2 Examples
1. Find the 3 smallest solutions to x2 − 2y 2 = 1.

2. (AMC 12) A triangular number is a positive integer that can be expressed in the form tn = 1 + 2 +
3 + · · · + n, for some positive integer n. The three smallest triangular numbers that are also perfect
squares are t1 = 1 = 12 , t8 = 36 = 62 , and t49 = 1225 = 352 . What is the sum of the digits of the
fourth smallest triangular number that is also a perfect square?

3.3 Exercises
1. (ARML) Let n be a positive integer, and consider the list 1, 2, 2, 3, 3, 3, ..., n, n, ..., n where the integer
k appears k times in the list for 1 ≤ k ≤ n. The integer n will be called ”ARMLy” if the median of
the list is not an integer. The least ARMLy integer is 3. Compute the least ARMLy integer greater
than 3.

2. Prove that if n is a natural number and (3n + 1) and (4n + 1) are both perfect squares, then 56 will
divide n.

3. (AIME) Find the largest integer n satisfying the following conditions:


(i) n2 can be expressed as the difference of two consecutive cubes;
(ii) 2n + 79 is a perfect square.

4. (British Math Olympiad) Find the first integer n > 1 such that the average of 12 , 22 , . . . , n2 is itself
a perfect square.

5. (European Girls Math Olympiad) Let S be the set of all positive integers n such that n4 has a
divisor in the range n2 + 1, n2 + 2, . . . , n2 + 2n. Prove that there are infinitely many elements of S
of each of the forms 7m, 7m + 1, 7m + 2, 7m + 5, 7m + 6 and no elements of S of the form 7m + 3 or
7m + 4, where m is an integer.

You might also like