0
$\begingroup$

I'm self-studying number theory using "A Computational Introduction to Number Theory and Algebra" by Victor Shoup, and this trivially-looking exercise throws me off:

Let $m$ $\in$ $\mathbb{Z}$, $m$ $\gt$ 0; $x$ $\in$ $\mathbb{R}$, $x$ $\ge$ 1. Show that the number of multiples of $m$ in $[1, x]$ is $\lfloor \frac{x}{m} \rfloor$

Let's take $x = 4.0$ and $m = 2$. Then $\lfloor \frac{x}{m} \rfloor = 2$. But I don't see two multiples of $m$ in $[1, 4.0]$:

  • first multiple goes from 1 to 3
  • second multiple goes from 3 to 5, and 5 $\notin [1, 4.0]$

What am I missing? This feels so elementary I'm even ashamed of asking

$\endgroup$
  • $\begingroup$ 4 is a multiple of 2, and 2 is a multiple of $2 = 1 \cdot 2$. $\endgroup$ – amWhy Aug 3 '18 at 14:50
0
$\begingroup$

I see exactly two multiples of $2$ in $[1,4]$: $2$ and $4$. Which concept of multiple are you using?

In the general case, the multiples of $m$ in $[1,x]$ are $m,2m,\ldots,\left\lfloor\frac xm\right\rfloor$. The nest multiple of $m$ is $\left(\left\lfloor\frac xm\right\rfloor+1\right)m$, which is greater than $x$.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Now I see what the question is asking. I was indeed using a different concept: I was thinking about "how many times a segment of length m can be placed into an interval [1,x]". Thanks for clarification $\endgroup$ – 0x00 Aug 3 '18 at 14:59
  • $\begingroup$ @0x00 I'm glad I could help. $\endgroup$ – José Carlos Santos Aug 3 '18 at 15:04
0
$\begingroup$

The multiples of $m=2$ are: $\{2,4,6,8,...\}$.

The closed interval $[1,x] = [1,4]$ contains 2 of these multiples, namely $\{2,4\}$.

This is the same as $\lfloor \frac{x}{m} \rfloor = \lfloor \frac{4}{2} \rfloor = 2$.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.