Clear Notion Academy

Sets, Relations and Functions (Beyond Advanced) Practice: How many distinct values does f(x)= x + 2x + 3x take as x ranges over [0,5) ?

Question

How many distinct values does f(x)=⌊x⌋+⌊2x⌋+⌊3x⌋f(x)=\lfloor x\rfloor+\lfloor2x\rfloor+\lfloor3x\rfloor take as xx ranges over [0,5)[0,5)?

Answer

Answer: 20

Hint

ff is non-decreasing and only changes value at points where xx, 2x2x or 3x3x is an integer. Count the distinct such points, being careful with coincidences.

Solution

Each of ⌊x⌋,⌊2x⌋,⌊3x⌋\lfloor x\rfloor,\lfloor2x\rfloor,\lfloor3x\rfloor is non-decreasing, so ff is non-decreasing, and it increases only at points where xx, 2x2x or 3x3x is an integer. At such a point ff jumps strictly up (by 11, 22 or 33 depending on how many of the three terms jump together), so every such point yields exactly one new value. Write the jump points as x=j6x=\tfrac j6 with j∈{1,…,29}j\in\{1,\dots,29\} (inside (0,5)(0,5)). xx is an integer iff 6∣j6\mid j; 2x2x is an integer iff 3∣j3\mid j; 3x3x is an integer iff 2∣j2\mid j. So jj is a jump point iff 2∣j2\mid j or 3∣j3\mid j. Among 1,…,291,\dots,29 the numbers divisible by 22 or 33: 14+9−4=1914+9-4=19. Together with the starting value f(0)=0f(0)=0 this gives 19+1=2019+1=20 distinct values. (Counting each of the three families separately, 4+9+14=274+9+14=27, would double count points such as x=1,2,…x=1,2,\dots.)

More questions from Sets, Relations and Functions (Beyond Advanced) Practice

Practise the full set: Sets, Relations and Functions — Beyond Advanced