Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Number Theory 1 Solutions UHSMC

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

UHS Math Club 2017-2018

Number Theory Handout 1 Answers and Solutions


Walker Kroubalkian
September 26, 2017

1 Answers

1. 12
2. 38
3. 23
4. 5
5. 9030
6. 5
7. 5
8. 7
9. 9
10. −125
11. {4, 9, 25} or 22 , 32 , 52


12. −x2 + 1 or 1 − x2
13. 72381
14. 24
15. 39

2 Solutions

1. Compute the smallest positive integer with exactly six different factors.
Solution: We remember that if the prime factorization of a number is pe11 · pe22 · pe33 · · · penn , the
number of factors of the number is (e1 + 1) · (e2 + 1) · (e3 + 1)· · · (en + 1). This fact will only be
stated in this solution but is constantly used throughout this handout. Setting this equal to 6,
we notice that there can be at most two factors inside the parentheses, as 6 = 2 × 3, and it is
impossible to represent 6 as a product of more numbers that are greater than 1. It follows that our
number must either be of the form p21 · p12 as (2 + 1) · (1 + 1) = 6 or of the form p51 as (5 + 1) = 6.
The smallest number of the form p21 · p12 is 22 · 31 = 12 and the smallest number of the form p51 is
25 = 32. Therefore, our answer is 12 .
2. We define a positive integer p to be almost prime if it has exactly one divisor other than 1 and
p. Compute the sum of the three smallest numbers which are almost prime.

1
UHS Math Club 2017-2018

Solution: Refer to the solution to problem 1. It follows that the number must be of the form p21
as (2 + 1) = 3. Therefore, the three smallest numbers are 22 = 4, 32 = 9, and 52 = 25. Therefore
our answer is 4 + 9 + 25 = 38 .
3. For any positive integer x ≥ 2, define f (x) to be the product of the distinct prime factors of x.
For example, f (12) = 2 × 3 = 6. Compute the number of integers 2 ≤ x < 100 such that f (x) < 10.
Solution: We will do casework on the value of f (x):
Case 1: f (x) = 1
If f (x) = 1, it follows that x has no prime factors, or x = 1 < 2. Therefore, we have 0 numbers in
this case.
Case 2: f (x) = 2
If f (x) = 2, it follows that x’s only prime factor is 2. It follows that x must be a power of 2, leading
to the powers from 21 to 26 for a total of 6 numbers in this case.
Case 3: f (x) = 3
If f (x) = 3, by similar logic to case 2, we must have x is a power of 3. This gives us the powers
from 31 to 34 , for a total of 4 numbers in this case.
Case 4: f (x) = 4
It is impossible for f (x) to equal 4 as 4 = 22 and 4 itself is not prime. By similar reasoning, it is
impossible for f (x) to equal 8 or 9 so we will exclude those cases.
Case 5: f (x) = 5
By similar logic to cases 2 and 3, x must be a power of 5. This gives us the powers from 51 to 52
for a total of 2 numbers in this case.
Case 6: f (x) = 6
This is the one truly annoying case. We must have x is of the form 2e1 · 3e2 where both e1 and e2 are
integers. By brute force we get the only possibilities are 21 31 , 21 32 , 21 33 , 22 31 , 22 32 , 23 31 , 23 32 , 24 31 ,
and 25 31 . This gives us a total of 9 numbers in this case.
Case 7: f (x) = 7
By similar logic to cases 2, 3, and 5, we have that x must be a power of 7. Thus, we have all of the
powers from 71 to 72 for a total of 2 numbers in this case.
Adding up all of our cases, we have a total of 6 + 4 + 2 + 9 + 2 = 23 numbers with these properties.
4. For a positive integer a, let f (a) be the average of all positive integers b such that x2 +ax+b = 0
has integer solutions. Compute the unique value of a such that f (a) = a.
Solution: We remember that if p and q are the solutions to the quadratic x2 + ax + b = 0, then
by Vieta’s Formulas, −a = p + q and b = pq. Because a is positive, both p and q must be negative
for p to be a positive integer. Therefore, we wish to compute
a a a a
b2c b2c b2c b2c
X X X X
(−i) × (−a + i) = i × (a − i) = a × i− i2
i=1 i=1 i=1 i=1

Pn n(n+1) Pn 2 n(n+1)(2n+1)
We remember by Gauss Sums that i=1 i = 2 and that i=1 i = 6 . It follows

2
UHS Math Club 2017-2018

a
that if we let 2 = z, then our expression is equivalent to

a · z · (z + 1) z · (z + 1) · (2z + 1) 3az 2 + 3az − 2z 3 − 3z 2 − z


− =
2 6 6
. We wish to determine when this is equal to a · z. There are two possibilities. Either a is even, in
which case, z = a2 , or a is odd, in which case z = a−1
2 . First, assume a is even. It follows that

a2 2a3 + 3a2 − 2a
= → 2a2 − 9a − 2 = 0
2 24
which has no integer solutions for a. It follows that a must be odd. In this case, we get

a(a − 1) 3a(a − 1)2 + 6a(a − 1) − (a − 1)3 − 3(a − 1)2 − 2(a − 1)


= → a2 − 6a + 5 = 0
2 24

It follows that a = 5 as desired.


5. What is the smallest number over 9000 that is divisible by the first four primes?
Solution: The first four primes are 2, 3, 5, and 7. It follows that any number which is divisible by
all of them must be divisible by 2 · 3 · 5 · 7 = 210. The smallest multiple of 210 which is greater
than 9000 is 210 × d 9000
210 e = 9030 as desired.
6. Consider a sequence given by an = an−1 + 3an−2 + an−3 , where a0 = a1 = a2 = 1. What is the
remainder when a2013 is divided by 7?
Solution: We wish to find a pattern in the remainder when an is divided by 7. By using the recur-
rence equation, we can calculate the first few values of an . However, by looking at the recurrence
an = an−1 + 3an−2 + an−3 , we find that the only property that effects the remainder when an is
divided by 7 is the remainders when an−1 , an−2 , and an−3 are divided by 7. Therefore, it suffices
to just calculate the remainders when values of an are divided by 7 until we get a triple that we
have already seen. This gives us the sequence

1, 1, 1, 5, 2, 4, 1, 1, 1,· · ·

as we can see, the sequence repeats every 6 values, so we get that

a2013 (mod 7) = a2013 (mod 6) (mod 7) = a3 = 5

as desired.
7. Define a number to be boring if all the digits of the number are the same. How many positive
integers less than 10000 are both prime and boring?
Solution: Notice that the number nn· · · n where each n is a digit is equal to n × 11· · · 1 where
the number of 1’s and n’s are equal. It follows that only numbers with a repeating digit of 1 could
possibly be prime if the number has more than 1 digit. These numbers are 11, 111, and 1111. By
brute force, we can find that 11 is the only number in this list that is prime. However, if the number
only has 1 digit, it does not matter which digit repeats. This adds the four primes 2, 3, 5, and 7.
Thus, there are 5 positive integers less than 10000 which are both prime and boring.
8. Given a number n in base 10, let g(n) be the base-3 representation of n. Let f (n) be equal
to the base-10 number obtained by interpreting g(n) in base 10. Compute the smallest positive
integer k ≥ 3 that divides f (k).

3
UHS Math Club 2017-2018

Solution: Let the base-3 representation of n be ax ax−1 · · · a0 , where all of the ai are digits from
the set {0, 1, 2}. It follows that

n = 3x × ax + 3x−1 × ax−1 +· · · + 30 × a0

When this is interpreted in base 10, we will get the value

f (n) = 10x × ax + 10x−1 × ax−1 +· · · 100 × a0

With this understanding of bases, we get the following values for f (n) for small values of n: f (3) =
10, f (4) = 11, f (5) = 12, f (6) = 20, f (7) = 21. Because 21
7 is an integer, we have that our answer
is 7 .
9. Given a 1962-digit number that is divisible by 9, let x be the sum of its digits. Let the sum of
the digits of x be y. Let the sum of the digits of y be z. Compute the maximum possible value of
z.
Solution: We notice that when we take the sum of the digits of a multiple of 9, we get a multiple
of 9. Thus, x is a multiple of 9 which is between 1 (in the case that the 1962-digit number is
10000· · · 00) and 9 × 1962 = 17658 (in the case that the 1962-digit number is 999· · · 99). It follows
that y is a multiple of 9 between 1 and 9 × 4 = 36 (in the case that x = 9999). It follows that z is
a multiple of 9 between 1 and 2 + 9 = 11 (in the case that y = 29). Therefore, no matter what the
1962-digit number was, z = 9 .
10. If f is a monic cubic polynomial with f (0) = −64, and all roots of f are nonnegative real
numbers, what is the largest possible value of f (−1)? (A polynomial is monic if it has a leading
coefficient of 1.)
Solution: We remember by Vieta’s formulas that if a cubic formula of the form x3 + ax2 + bx + c
has roots r1 , r2 , and r3 , then −a = r1 + r2 + r3 , b = r1 r2 + r1 r3 + r2 r3 , and −c = r1 r2 r3 . The
cubic could also be written in the form (x − r1 ) × (x − r2 ) × (x − r3 ). Because f (0) = −64,
we must have c = −64, meaning r1 r2 r3 = 64. Given this, we wish to maximize the value of
(−1 − r1 )(−1 − r2 )(−1 − r3 ) = −(1 + r1 )(1 + r2 )(1 + r3 ), meaning that we want to minimize the
value of (1 + r1 )(1 + r2 )(1 + r3 ) when r1 r2 r3 = 64. By experimentation, we can find that this is
minimized when r1 = r2 = r3 = 4, giving a value of (1 + 4)3 = 125. For a more rigorous proof, we
can use Holder’s Inequality to find that
1 1 1 √
(1 + r1 ) 3 × (1 + r2 ) 3 × (1 + r3 ) 3 ≥ 1 + 3
r1 r2 r3 = 5

Cubing both sides immediately gives the result. However, we must remember that this is equal to
−f (−1). Therefore, the maximum value of f (−1) is −125 as desired.
11. Find all square numbers which can be represented in the form 2a +3b , where a, b are nonnegative
integers. You can assume the fact that the equation 3x − 2y = 1 has no integer solutions if x ≥ 3.
Solution: First, assume b is 0. It follows that we wish to find numbers x and a such that x2 = 2a +1.
This rearranges to (x − 1)(x + 1) = 2a . Because x is an integer, this is only possible if both x − 1
and x + 1 are powers of 2. If x − 1 is odd, it must be 1, so x + 1 is 3, leading to no solutions. If
x − 1 is even, than one of x − 1 and x + 1 must be a multiple of 4 while the other is only a multiple
of 2. This only leads to the solution of x = 3, or x2 = 9, as this is the only value for which both
x − 1 and x + 1 are powers of 2. Now, assume b is positive. It follows by the fact that perfect
squares can only be equivalent to 0 or 1 (mod 3) that a must be even. Now let a = 2y. It follows
that x2 = 22y + 3b . Rearranging, we get (x − 2y )(x + 2y ) = 3b . Because at most one of (x − 2y ) or

4
UHS Math Club 2017-2018

(x + 2y ) can be divisible by 3, this can only be possible if x − 2y = 1 and x + 2y = 3b . It follows


that 3b − 2y+1 = 1. However, we have been told that 3x − 2y = 1 has no integer solutions when
x ≥ 3. Therefore, Plugging values in, we get the only pairs (b, y + 1) which work are (2, 3) and
(1, 1). These pairs lead to the solutions 24 + 32 = 25 and 20 + 31 = 4, respectively. Therefore our
solutions are {4, 9, 25} or 22 , 32 , 52 as desired.


12. Find the unique polynomial P (x) with coefficients taken from the set {−1, 0, 1} and with least
possible degree such that P (2010) ≡ 1 (mod 3), P (2011) ≡ 0 (mod 3), and P (2012) ≡ 0 (mod 3).
Solution: Notice that if the coefficients are integers, than P (2010) ≡ 1 (mod 3) implies P (2010
(mod 3)) = P (0) ≡ 1 (mod 3). Similarly, P (1) ≡ 0 (mod 3) and P (2) ≡ 0 (mod 3). Because
P (0) ≡ 1 (mod 3), we must have the constant term is 1. Notice that if the polynomial were linear,
than if the coefficient of the x-term were a, we would have a + 1 ≡ 0 (mod 3) and 2a + 1 ≡ 0
(mod 3) which is clearly impossible. If the polynomial were quadratic and of the form ax2 + bx + 1,
we would have a + b ≡ 2 (mod 3) and 4a + 2b ≡ 2 (mod 3). It follows that b ≡ 0 (mod 3) and
a ≡ 2 (mod 3). Thus, the unique polynomial of minimum degree is P (x) = −x2 + 1 .
13. Compute the sum of all n for which the equation 2x + 3y = n has exactly 2011 nonnegative
(x, y ≥ 0) integer solutions.
Solution: Consider the nonnegative integer solution (xm , ym ) with the maximum value of y.
Notice that to get other solutions, we must decrease ym by multiples of 2 and increase xm by
corresponding multiples of 3. It follows that the total number of solutions is b ym2+2 c due to
the fact that we must include 0 as a possible value of y in the equation. Setting this equal
to 2011 and solving gives us y = 4020 and y = 4021. Notice that when y is maximized, x
must be less than or equal to 3, as otherwise we could decrease x by 3 to get a solution with
a larger value of y. It follows that x is among the set {0, 1, 2}. Therefore, (xm , ym ) is among
the set {(0, 4020), (1, 4020), (2, 4020), (0, 4021), (1, 4021), (2, 4021)}. These give us values of n of
{12060, 12062, 12064, 12063, 12065, 12067}, respectively. Adding these up, we get a total of 72381
as desired.
14. Find the largest integer that divides p2 − 1 for all primes p > 3.
Solution: We claim that the largest integer that divides p2 − 1 for all primes p > 3 is 24. Notice
that 52 − 1 = 24, so clearly the largest integer must be a factor of 24. Notice that all primes p > 3
are not multiples of 3. Therefore, we either have p ≡ 1 (mod 3) or p ≡ 2 (mod 3). Squaring both
gives us p2 ≡ 1 (mod 3) or p2 ≡ 1 (mod 3). Therefore, no matter what prime is chosen, p2 − 1 ≡ 0
(mod 3), and therefore 3 must be a factor of p2 − 1. We can also write p2 − 1 as (p − 1) × (p + 1).
Notice that when p > 3, we must have p is odd, so both (p − 1) and (p + 1) are even. However,
because they are consecutive even numbers, one must also be a multiple of 4. Therefore, 8 divides
p2 − 1. Thus, we have shown 3 · 8 = 24 divides p2 − 1 for all primes p > 3, and we have also shown
this is the largest integer with this property.
15. A positive integer b ≥ 2 is neat if and only if there exist positive base-b digits x and y (that
is, x and y are integers, 0 < x < b and 0 < y < b) such that the number x.y base b (that is, x + yb )
is an integer multiple of xy . Find the number of neat integers less than or equal to 100.
y xb+y
Solution: Notice that we can write x.y in base b as x + b = b . If this is an integer multiple of
xb+y
x xby+y 2 y2
y, we must have b
x = xb = y+ xb is an integer. It follows that y 2 is divisible by xb. Clearly,
y
if this is true when x > 1, than it will also be true when x = 1. Therefore, b is neat if and only if
we can find a number y less than b such that y 2 is divisible by b. Notice that if b has any prime

5
UHS Math Club 2017-2018

factor which is repeated in its prime factorization, than we can divide b by that prime to get a
number y which satisfies this property, as the result will clearly satisfy y < b and it will satisfy y 2
is divisible by all other prime power factors of b. If we let the number of occurrences of the prime
we chose be x, than the number of times it appears in the factorization of y 2 is 2x − 2, so we must
have 2x − 2 ≥ x. However, this is always true when x > 1, so we have shown this value of y will
satisfy the property. Therefore, any number which is not squarefree will be neat.
We will do casework on which prime factors occur more than once in the prime factorization of x.
Case 1: 2 occurs more than once.
100
If 2 occurs more than once, the number must be a multiple of 4. There are 4 = 25 multiples of 4
less than 100.
Case 2: 3 occurs more than once.
If 3 occurs more than once, the number must be a multiple of 9. There are b 100
9 c = 11 multiples of
9, but we have already counted multiples of 36, so we must subtract b 100
36 c = 2 for a total of 9 new
multiples of 9 less than 100.
Case 3: 5 occurs more than once.
If 5 occurs more than once, the number must be a multiple of 25. There are 100 25 = 4 multiples
of 25 less than or equal to 100 but we have already counted multiples of 100 so we must subtract
100
100 = 1 for a total of 3 new multiples of 25 less than 100.
Case 4: 7 occurs more than once.
If 7 occurs more than once, the number must be a multiple of 49. There are b 100
49 c = 2 multiples of
49 less than or equal to 100.
Adding up all of our cases, we have a total of 25 + 9 + 3 + 2 = 39 neat numbers less than or equal
to 100.

3 Sources

1. 2014 Stanford Math Tournament General Problem 9


2. 2014 Stanford Math Tournament General Problem 13
3. 2014 Stanford Math Tournament General Problem 22
4. 2014 Stanford Math Tournament General Problem 23
5. 2013 Stanford Math Tournament General Problem 4
6. 2013 Stanford Math Tournament General Problem 10
7. 2012 Stanford Math Tournament General Problem 13
8. 2012 Stanford Math Tournament General Problem 14
9. 2012 Stanford Math Tournament General Problem 16
10. 2012 Stanford Math Tournament General Problem 19
11. 2011 Stanford Math Tournament General Problem 6
12. 2011 Stanford Math Tournament General Problem 11
13. 2011 Stanford Math Tournament General Problem 22
14. 2014 Stanford Math Tournament Advanced Topics Problem 2
15. 2013 Stanford Math Tournament Advanced Topics Problem 6

You might also like