AMC 10 Step by Step

2002 AMC 10B Problem 16

P16-20~4 minPrint

For how many integers nn is n20−n\dfrac n{20-n} the square of an integer?

Log in to save your progress.
Show solution without answering

Key insight

A square is never negative, so n is from 0 to 19 and the fraction is at most 19. Only the squares 0, 1, 4, 9 give whole-number n.

Solution

There are infinitely many integers nn, so first narrow down where nn can be. Then check the few candidates.

1. The fraction cannot be negative, because a square is never negative.
- If nn is negative, the top is negative and the bottom 20−n20 - n is positive, so the fraction is negative.
- If nn is more than 2020, the top is positive and the bottom is negative, so again negative.
- If n=20n = 20, the bottom is 00, which is not allowed.

So nn is one of 0,1,2,…,190, 1, 2, \ldots, 19.
2. How big can the fraction be? As nn goes up from 00 to 1919, the top grows and the bottom shrinks, so the largest value is at n=19n = 19: 191=19\frac{19}{1} = 19. The squares from 00 to 1919 are 0,1,4,9,160, 1, 4, 9, 16.
3. Solve for nn for each square. If n20−n=s\frac{n}{20 - n} = s, then n=s(20−n)n = s(20 - n), so n+sn=20sn + sn = 20s and
n=20ss+1.n = \frac{20s}{s + 1}.

square ss001144991616
n=20ss+1n = \frac{20s}{s+1}0010101616181832017\frac{320}{17}
  1. The first four are whole numbers; 32017\frac{320}{17} is not. Check one: n=18n = 18 gives 182=9=32\frac{18}{2} = 9 = 3^2.

So n=0,10,16,18n = 0, 10, 16, 18 work: four values.

The answer is (D) 4\boxed{\textbf{(D)}\ 4}.

Why this works

When a question seems to have infinitely many possibilities, look for limits first. Here the sign of the fraction boxed nn into 00 to 1919, and the size of the fraction limited which squares could appear. After that, a five-column table finished the job. Remember that 0=020 = 0^2 counts as a perfect square.

Alternative approach

Just test n=0n = 0 to 1919. For n=1n = 1 to 99 the top is smaller than the bottom, so the fraction is between 00 and 11 and cannot be a whole number. That leaves n=0n = 0 and n=10n = 10 to 1919:

nn001010111112121313141415151616171718181919
n20−n\frac{n}{20-n}0011119\frac{11}{9}32\frac32137\frac{13}{7}73\frac733344173\frac{17}{3}991919

The squares are at n=0,10,16,18n = 0, 10, 16, 18.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Set n20−n=k2\frac{n}{20-n} = k^2 with k≥0k \ge 0 an integer. A square is at least 00, so the fraction cannot be negative. If n<0n < 0 the numerator is negative and the denominator positive; if n>20n > 20 the reverse; and n=20n = 20 is undefined. Hence 0≤n≤190 \le n \le 19.

On that range the fraction is largest at n=19n = 19, where it equals 1919. So k2≤19k^2 \le 19, meaning k∈{0,1,2,3,4}k \in \{0, 1, 2, 3, 4\}.

Solve for nn: n=k2(20−n)n = k^2(20 - n) gives n(k2+1)=20k2n(k^2 + 1) = 20k^2, so
n=20k2k2+1.n = \frac{20k^2}{k^2 + 1}.
- k=0k = 0: n=0n = 0.
- k=1k = 1: n=202=10n = \frac{20}{2} = 10.
- k=2k = 2: n=805=16n = \frac{80}{5} = 16.
- k=3k = 3: n=18010=18n = \frac{180}{10} = 18.
- k=4k = 4: n=32017n = \frac{320}{17}, not an integer.

Four values of nn work: 0,10,16,180, 10, 16, 18.

The answer is (D) 4\boxed{\textbf{(D)}\ 4}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site. Also appeared as 2002 12B #12.