# How many natural numbers $a\le100$ are there such that $a=[\frac a2]+[\frac a3]+[\frac a5]$, where [.] represents the greatest integer function?

A natural number $$a$$ is selected from the first $$100$$ natural numbers. The probability that $$a=[\frac a2]+[\frac a3]+[\frac a5]$$, where [.] represents greatest integer function, is $$\frac mn$$ where $$m,n$$ are coprime then $$(m+n)$$ is equal to

My Attempt:

Let $$a=30n+\gamma$$, where $$0\le\gamma\lt30$$

Putting this in the given equation, I get,

$$n=\gamma-[\frac{\gamma}{2}]-[\frac{\gamma}{3}]-[\frac{\gamma}{5}]$$

$$\gamma=0$$ doesn't satisfy but $$\gamma=1, 2, ..., 29$$ satisfy.

So, the probability is $$\frac{29}{100}$$.

Is this correct?

• Feb 24 at 11:24
• I think your idea is good but you could be more specific : the condition $n=\gamma-\left [\frac{\gamma}{2}\right ]-\left [\frac{\gamma}{3}\right ]-\left [\frac{\gamma}{2}\right ]$ is a necessary and sufficient one. $\gamma=0$ gives $n=0$ hence $a=0$ which is not solution as $a$ is choosen in $\mathbb [1;100\mathbb ]$ as I understand. Feb 24 at 11:29

The answer looks correct. But you probably should demonstrate that $$a\le 100$$ when $$\gamma=1,2,…,29$$. It is sufficient to show that $$n\le 2$$. It is true since $$n=\gamma-[\gamma/2]-[\gamma/3]-[\gamma/5]\le$$

$$\le \gamma-(\gamma/2-1/2)-(\gamma/3-2/3)-(\gamma/5-4/5)=$$

$$=59/30-\gamma/30\le 2.$$

It is also worth showing that $$n\ge 0$$:

$$n=\gamma-[\gamma/2]-[\gamma/3]-[\gamma/5]\ge$$

$$\ge\gamma-\gamma/2-\gamma/3-\gamma/5=-\gamma/30.$$

Since $$\gamma <30$$, we get $$n\ge-\gamma/30>-1\ge 0$$.

Finally, it would be good to show that different values of $$\gamma$$ give different values of $$a$$. If different values of $$\gamma$$ lead to different values of $$n$$ then values of $$a$$ will be different since $$\gamma<30$$. Otherwise, if values of $$n$$ are the same, then values of $$a=30n+\gamma$$ obviously differ.

Yes, the answer is $$\frac{29}{100}$$. There are a few details that need to be taken care of.
You are setting $$\gamma$$ to be one of $$\{1,2,\dots,29\}$$ and each value of $$\gamma$$ generates a value for $$n$$, which then determines $$a=30n+\gamma$$.

Why is $$\gamma\ge \left\lfloor \frac{\gamma}{2} \right\rfloor + \left\lfloor \frac{\gamma}{3} \right\rfloor + \left\lfloor \frac{\gamma}{5} \right\rfloor$$ for all $$\gamma \in \{1,2,\dots,29\}$$ ?

What about two different $$\gamma$$'s giving the same value for $$a$$ ?

Is the condition $$a\le 100$$ satisfied in each case ?

Let $$a=6q+r$$. Then we need $$r =\left[\dfrac{r}{2} \right]+\left[\dfrac{r}{3} \right]+\left[\dfrac{q+r}{5} \right]$$

When $$r=0$$, $$q$$ can be $$1,2,3,4$$

For $$r=1,2,3,4,5$$ it is easy to see that $$q$$ has $$5$$ solutions each (none exceeding $$100$$)

Thus there are $$29$$ solutions