AMC 10 Step by Step

2016 AMC 10B Problem 25

P21-25~10 minPrint

Let f(x)=∑k=210(⌊kx⌋−k⌊x⌋)f(x)=\sum_{k=2}^{10}(\lfloor kx \rfloor -k \lfloor x \rfloor) , where ⌊r⌋\lfloor r \rfloor denotes the greatest integer less than or equal to rr . How many distinct values does f(x)f(x) assume for x≥0x \ge 0 ?

Log in to save your progress.
Show solution without answering

Key insight

Each term depends only on the part of x after the decimal point. As it grows, f steps up once at each fraction with bottom at most 10.

Solution

Step 1: only the part after the decimal point matters.

1. Split xx into its whole part n=⌊x⌋n = \lfloor x \rfloor and its leftover part t=x−nt = x - n, where 0≤t<10 \le t < 1. For example, x=3.4x = 3.4 gives n=3n = 3 and t=0.4t = 0.4.
2. Then kx=kn+ktkx = kn + kt, and knkn is a whole number. So ⌊kx⌋=kn+⌊kt⌋\lfloor kx \rfloor = kn + \lfloor kt \rfloor.
3. Each term becomes ⌊kx⌋−k⌊x⌋=kn+⌊kt⌋−kn=⌊kt⌋\lfloor kx \rfloor - k\lfloor x \rfloor = kn + \lfloor kt \rfloor - kn = \lfloor kt \rfloor.
4. So
f(x)=⌊2t⌋+⌊3t⌋+⋯+⌊10t⌋,f(x) = \lfloor 2t \rfloor + \lfloor 3t \rfloor + \cdots + \lfloor 10t \rfloor,
which depends only on tt. We only need to study tt from 00 up to (not including) 11.

Step 2: watch ff as tt grows.

  1. At t=0t = 0 every term is 00, so f=0f = 0.
  2. As tt increases, ⌊kt⌋\lfloor kt \rfloor never goes down. It goes up by 11 each time ktkt reaches a whole number, that is, at t=1k,2k,…,k−1kt = \frac1k, \frac2k, \ldots, \frac{k-1}{k}.
  3. So ff climbs in steps. It goes up at every fraction between 00 and 11 whose bottom number is at most 1010, and it stays flat between them. Each step is a real increase, so every flat stretch has a new, larger value.
  4. The number of different values is 11 (the starting value 00) plus the number of different step points.

Step 3: count the step points. Several fractions name the same point (12=24=36=…\frac12 = \frac24 = \frac36 = \ldots), so count each point once, by writing it in lowest terms and sorting by its bottom number:

bottom number22334455667788991010
fractions in lowest terms12\frac1213,23\frac13, \frac2314,34\frac14, \frac3415,…,45\frac15, \ldots, \frac4516,56\frac16, \frac5617,…,67\frac17, \ldots, \frac6718,38,58,78\frac18, \frac38, \frac58, \frac7819,29,49,59,79,89\frac19, \frac29, \frac49, \frac59, \frac79, \frac89110,310,710,910\frac1{10}, \frac3{10}, \frac7{10}, \frac9{10}
how many112222442266446644

That is 1+2+2+4+2+6+4+6+4=311 + 2 + 2 + 4 + 2 + 6 + 4 + 6 + 4 = 31 step points.

So ff takes 31+1=3231 + 1 = 32 different values.

The answer is (A) 32\boxed{\textbf{(A)}\ 32}.

Why this works

The expression ⌊kx⌋−k⌊x⌋\lfloor kx \rfloor - k\lfloor x \rfloor is built to cancel the whole-number part of xx, so a problem about all x≥0x \ge 0 becomes a problem about 0≤t<10 \le t < 1. A total that only ever steps up has one more value than it has step points. The real work is not counting the same point twice, which is why each fraction is written in lowest terms. (The numbers in the last row are often written φ(k)\varphi(k): how many numbers from 11 to kk share no common factor with kk.)

Concise solution

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

Write x=n+tx = n + t with n=⌊x⌋n = \lfloor x \rfloor and t={x}∈[0,1)t = \{x\} \in [0, 1). Then kx=kn+ktkx = kn + kt with knkn an integer, so ⌊kx⌋=kn+⌊kt⌋\lfloor kx \rfloor = kn + \lfloor kt \rfloor and each term is
⌊kx⌋−k⌊x⌋=⌊kt⌋.\lfloor kx \rfloor - k\lfloor x \rfloor = \lfloor kt \rfloor.
Thus f(x)=g(t)=∑k=210⌊kt⌋f(x) = g(t) = \sum_{k=2}^{10} \lfloor kt \rfloor depends only on the fractional part, and we may take 0≤t<10 \le t < 1.

Each ⌊kt⌋\lfloor kt \rfloor is a nondecreasing step function of tt that jumps by 11 exactly when ktkt passes an integer, i.e. at t=jkt = \tfrac{j}{k} for j=1,…,k−1j = 1, \ldots, k-1. So gg is nondecreasing, starts at g(0)=0g(0) = 0, and increases exactly when tt crosses a fraction in (0,1)(0,1) whose reduced denominator is at most 1010. Every crossing strictly raises gg, so gg takes one value on each interval between consecutive jump points, and different intervals give different values.

The number of distinct values is therefore 11 plus the number of distinct fractions in (0,1)(0,1) with denominator at most 1010. Counting reduced fractions by denominator with Euler's φ\varphi:
φ(2)+φ(3)+⋯+φ(10)=1+2+2+4+2+6+4+6+4=31.\varphi(2) + \varphi(3) + \cdots + \varphi(10) = 1 + 2 + 2 + 4 + 2 + 6 + 4 + 6 + 4 = 31.

So gg takes 31+1=3231 + 1 = 32 distinct values.

The answer is (A) 32\boxed{\textbf{(A)}\ 32}.

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.