11

If $n$ is a positive integer, prove that $$\left\lfloor\frac{8n+13}{25}\right\rfloor-\left\lfloor\frac{n-12-\left\lfloor\frac{n-17}{25}\right\rfloor}{3}\right\rfloor$$ is independent of $n$.

Taking $$f(n)=\left\lfloor\frac{8n+13}{25}\right\rfloor-\left\lfloor\frac{n-12-\left\lfloor\frac{n-17}{25}\right\rfloor}{3}\right\rfloor$$ I could prove that $$f(n+25)=f(n)$$ But, I have no idea how to show $$f(n+k)=f(n)\\\forall k\in \{1,2,\dots 24\}$$ Of course, we can check these finite number of cases by force. But is there any other elegant method to handle this?

Sayan Dutta
  • 8,831
  • 2
    It is equivalent to prove

    $$\left\lfloor \frac{8n+13}{25} \right\rfloor = \left\lfloor \frac{n-a}{3} \right\rfloor, ; a = \left\lfloor\frac{n-17}{25}\right\rfloor, ; n \in \mathbb{Z}^{>0}$$

    –  Jul 09 '22 at 07:43
  • @BeKind of course, but how does that help? – Sayan Dutta Jul 09 '22 at 08:00
  • 2
    If you let $n= 25k + r; 17\le r < 42$ then $\left\lfloor\frac{n-12-\left\lfloor\frac{n-17}{25}\right\rfloor}{3}\right\rfloor= 8k + 4$. Then $[\frac {8n+13}{25}]= [8k +\frac{8r+13}{25}]$. Can show the the margin of error overlaps. – fleablood Jul 09 '22 at 08:49
  • 2
    But this does not work. If $r=17$, then $\left \lfloor 8k+\frac{8r+13}{25} \right \rfloor = 8k+5$. Yet when $r=24$, $\left \lfloor 8k+\frac{8r+13}{25} \right \rfloor = 8k+8$. The difference from $8k+4$will not be the same. – Li Kwok Keung Jul 09 '22 at 09:23
  • 1
    Hint: from a quick glance it looks like it arises from something like below

    $$\begin{align} \left\lfloor\frac{1}c,\left\lfloor\frac{1}d,(can,+,b), \right \rfloor \right\rfloor &= \left\lfloor \frac{1}d(an+\lfloor b/c \rfloor)\right\rfloor \[.6em] \Rightarrow\ \left\lfloor\frac{1}{3}\left\lfloor\frac{1}{25}(24n!+!41) \right \rfloor \right\rfloor &= \left\lfloor \frac{1}{25}(8n+ 13 )\right\rfloor \end{align}\qquad\qquad$$

    – Bill Dubuque Jul 09 '22 at 19:14

5 Answers5

5

Using $\color{darkorange}{\rm UF}$ = universal property of floor, i.e. $\ k\le \lfloor r\rfloor\!\!\iff\! k\le r;\ $ $\ \color{#90f}{k \le -\lfloor r\rfloor\!\!\iff\! k\!-\!1< -r},\ $ the proof reduces to trivial algebra, i.e. apply $\,\lfloor(r\!-\!12)/3\rfloor^{\phantom{|^|}}\!\!\! = \lfloor r/3\rfloor - 4\,$ followed by below.

$\begin{align} {\bf Theorem}\ \quad \lfloor \color{#0a0}{\tfrac{1}{25}(8n+3)}\rfloor &= \lfloor \tfrac{1}{3}(n - \lfloor(n-17)/25\rfloor)\rfloor,\ \ {\rm for}\ \ n\in\Bbb Z\\[.4em] {\bf Proof}\ \ {\rm for}\ \ k\in\Bbb Z\!:\ \ \qquad k&\ \le\, \tfrac{1}{3}(n - \lfloor(n-17)/25\rfloor)\\[.2em] \iff\ 3k-n&\,\le\,\ \ \ \ \ \ \ -\lfloor(n-17)/25\rfloor\\[.3em] \iff\ 3k-n &\,\le\, (-n+41)/25,\ \ {\rm by\ Lemma\ below}\\[.3em] \smash[t]{\overset{\times\ 25}\iff}\ \ \ \ \ \ \ \ 75k &\,\le\,\ 24n+41\\[.3em] \smash[t]{\overset{\div\,3}\iff}\ \ \ \ \ \ \ \,25k &\,\le\ \ \ 8n+ 13,\ \ {\rm by}\ \ 25k\in\Bbb Z\\[.2em] \iff\qquad\ \ \ k &\,\le \color{#0a0}{\tfrac{1}{25}(8n+3)} \end{align}$

Lemma $\ \ \ \ \color{#90f}{j \,\le\, -\lfloor a/b\rfloor}\iff j\!\color{darkorange}{-\!1}\le (-a\!\color{darkorange}{-\!1})/b,\ \ {\rm for}\,\ \color{#c00}{b>0}\,$ (wlog), $\,a,b\in\Bbb Z$
Pf: $ \overset{\rm\color{darkorange}{UF}}\iff\! \color{#90f}{j\!-\!1 < {-}a/b}\!\!\underset{\color{#c00}{\times\ b}}\iff\! b(j\!\color{darkorange}{-\!1})\!\,\le -a\!\color{darkorange}{-\!1}\ $ [by $\ m<n\!\iff m\le n\!\color{darkorange}{-\!1}$]

Bill Dubuque
  • 272,048
4

This is an amendment of my solution inspired by fleablood's comment:

To simplify the expression $\left \lfloor \frac{n-17}{25} \right \rfloor$, let $n-17=25k+r$ i.e. $n=25k+r+17$ where $0 \le r \le 24$.

Then

$$\left\lfloor \frac{8n+13}{25}\right \rfloor=\left\lfloor \frac{8(25k+r+17)+13}{25} \right\rfloor = 8k+5+\left\lfloor \frac{8r+24}{25} \right\rfloor$$

and $$\left\lfloor \frac{n-12-\left\lfloor \frac{n-17}{25} \right\rfloor}{3} \right\rfloor =\left\lfloor \frac{25k+r+17-12-\left\lfloor \frac{25k+r+17-17}{25}\right \rfloor}{3} \right\rfloor=8k+1+\left\lfloor \frac{r+2}{3}\right \rfloor $$

The job is done if we can prove that

$$\left\lfloor \frac{8r+24}{25}\right \rfloor - \left\lfloor \frac{r+2}{3} \right\rfloor $$ is independent of $r$ when $0 \le r \le 24$

For this, put $r=3m+h$ where $0 \le h \le 2$ and $0 \le r \le 24$.

It is not difficult to check that $$\left\lfloor \frac{8r+24}{25}\right \rfloor = \left\lfloor \frac{r+2}{3} \right\rfloor $$ under the said conditions.

4

Here is a variation which is also related to Bill Dubuque's hint. We want to show that \begin{align*} f(n)&=\left\lfloor\frac{8n+13}{25}\right\rfloor-\left\lfloor\frac{n-12-\left\lfloor\frac{n-17}{25}\right\rfloor}{3}\right\rfloor\\ &=\left\lfloor\frac{8n+13}{25}\right\rfloor-\left\lfloor\frac{n-\left\lfloor\frac{n-17}{25}\right\rfloor}{3}\right\rfloor+4 \end{align*} is independent from $n$. Since \begin{align*} f(0)&=\left\lfloor\frac{13}{25}\right\rfloor-\left\lfloor\frac{-\left\lfloor\frac{-17}{25}\right\rfloor}{3}\right\rfloor+4\\ &=0-0+4=4 \end{align*} we claim the following is valid for all non-negative integers $n$: \begin{align*} \color{blue}{\left\lfloor\frac{8n+13}{25}\right\rfloor=\left\lfloor\frac{n-\left\lfloor\frac{n-17}{25}\right\rfloor}{3}\right\rfloor}\tag{1} \end{align*}

We start with the right-hand side of (1) and obtain \begin{align*} \color{blue}{\left\lfloor\frac{n-\left\lfloor\frac{n-17}{25}\right\rfloor}{3}\right\rfloor} &=\left\lfloor\frac{-\left\lfloor\frac{-24n-17}{25}\right\rfloor}{3}\right\rfloor =\left\lfloor\frac{\left\lceil\frac{24n+17}{25}\right\rceil}{3}\right\rfloor\tag{2.1}\\ &=\left\lfloor\frac{\left\lfloor\frac{24n+41}{25}\right\rfloor}{3}\right\rfloor =\left\lfloor\frac{24n+41}{75}\right\rfloor\tag{2.2}\\ &=\left\lfloor\frac{24n+39}{75}\right\rfloor\tag{2.3}\\ &\,\,\color{blue}{=\left\lfloor\frac{8n+13}{25}\right\rfloor} \end{align*} and the claim follows.

Comment:

  • In (2.1) we bring $n$ into the inner floor symbol and use the rule $$\lfloor -x\rfloor=-\lceil x\rceil$$

  • In (2.2) we use the rule \begin{align*} \left\lceil \frac{n}{m} \right\rceil =\left \lfloor \frac{n+m-1}{m} \right\rfloor \end{align*} and also the nested division rule \begin{align*} \left\lfloor\frac{\left\lfloor x/m\right\rfloor}{n}\right\rfloor=\left\lfloor\frac{x}{mn}\right\rfloor \end{align*}

  • In (2.3) we can check for $0\leq n<25$ the validity of $\left\lfloor\frac{24n+41}{75}\right\rfloor=\left\lfloor\frac{24n+39}{75}\right\rfloor$. We can alternatively note the difference between these two expressions inside the floor symbols is $\frac{2}{75}$. So, different natural numbers would occur, iff there is a natural number $m$ with \begin{align*} \frac{24n+39}{75}=m-\frac{1}{75}\qquad\quad\text{and}\qquad\quad\frac{24n+41}{75}=m+\frac{1}{75} \end{align*} This is equivalent with the existence of a solution of the linear congruence relation \begin{align*} 24n+41&\equiv 1\pmod{75}\\ 24n&\equiv 35\pmod{75}\\ \end{align*} But this has no solution, since \begin{align*} 35&\not\equiv 0\pmod{\gcd(24,75)}\\ 35&\not\equiv 0\pmod{3}\\ \end{align*}

Bill Dubuque
  • 272,048
Markus Scheuer
  • 108,315
2

Here's an approach that involves checking considerably fewer than $24$ cases, with it also having the advantage that it helps to provide a somewhat intuitive explanation of why the relation holds.

First, note that $\left\lfloor\frac{n-12-\left\lfloor\frac{n-17}{25}\right\rfloor}{3}\right\rfloor = \left\lfloor\frac{n-\left\lfloor\frac{n-17}{25}\right\rfloor}{3}\right\rfloor - 4$. Since $-4$ doesn't affect whether or not your $f(n)$ is always a constant, I'll ignore it. Next, set

$$g(n) = \left\lfloor\frac{8n+13}{25}\right\rfloor, \; \; h(n) = \left\lfloor\frac{n-\left\lfloor\frac{n-17}{25}\right\rfloor}{3}\right\rfloor, \; \; f_1(n) = g(n) - h(n) \tag{1}\label{eq1A}$$

As you've indicated, $f(n)$ (and, thus, my $f_1(n)$) has a period of $25$. Thus, we just need to prove that $f_1(n)$ doesn't change for any consecutive set of $25$ integers, so induction can then be used for any larger values, & also smaller values, to show $f_1(n)$ is constant for all integers, not only just the positive ones.

Note the numerators inside the floor functions in $g(n)$ and $h(n)$ are both increasing functions, both $g(n)$ and $h(n)$ are integral valued step functions, and the increase of each step is just one. I'll show that $f_1(n)$ is a constant for $0 \le n \le 24$ by checking the end-points and each value of $n$ where $h(n)$ increases. At those points, I'll show that

$$8n + 13 = 25(h(n)) + r, \; \; 0 \le r \le 12 \tag{2}\label{eq2A}$$

to confirm $g(n) = h(n)$ and $g(n-1) = g(n) - 1$.

For $0 \le n \le 16$, we have $h(n) = \left\lfloor\frac{n+1}{3}\right\rfloor$, and for $17 \le n \le 24$, we have $h(n) = \left\lfloor\frac{n}{3}\right\rfloor$. Next, $g(0) = h(0) = 0$ and

$$h(2) = 1, \; 8(2) + 13 = 25(1) + 4 \tag{3}\label{eq3A}$$

For $n$ up to $16$, the value of $h(n)$ increases by $1$ for each increase in $n$ by $3$, with $8n + 13$ increasing by $8(3) = 25 - 1$ each time. This means $g(n)$ also increases by $1$, but with the value of $r$ decreasing by $1$ each time, starting from $4$ as indicated in \eqref{eq2A}. Thus, we get a match up to $h(14) = 5, \; 8(14) + 13 = 25(5) + 0$.

The next $h(n)$ increase is at $n = 18$, with $h(18) = 6, \; 8(18) + 13 = 25(6) + 7$. Thus, as discussed above, we'll continue to have matching increases with $g(21) = h(21)$ and $g(24) = h(24)$. This confirms $g(n) = h(n)$ for $0 \le n \le 24$.


Note: Since the remainder $r$ is $0$ at $n = 14$, the next increase in $h(n)$ must occur when $n$ increases by $4$ instead of $3$, with this accomplished by the increase in value of $\left\lfloor\frac{n-m}{25}\right\rfloor$ at $n = m$ for any $15 \le m \le 17$, not just $m = 17$ as used in the question.

John Omielan
  • 47,976
2

Brute force won't be that hard.

We can uniquely write $n$ as $25k +r$ where $17\le r < 42$.

$[\frac {n-17}{25}] = [\frac {25k + (r-17)}{25}] = [k + \frac {r-17}{25}] = k$.

$[\frac {n-12-[\frac {n-17}{25}]}3]=[\frac {25k -12 + r -k}{3}]=[\frac {24k -12 +r}3]= [8k -4 +\frac r3]= 8k -4 + [\frac r3]$.

Meanwhile $[\frac {8n + 13}{25}]=[8k + \frac {8r+13}{25}]= 8k +[\frac {8r+13}{25}]$

And $[\frac {8n + 13}{25}]-[\frac {n-12-[\frac {n-17}{25}]}3]=[\frac {8r+13}{25}]- [\frac r3]+4$

If suffices to prove that is constant for $17 \le r < 42$.

Taking a single value, say $r=25$ (hey, I'm lazy) we have $[\frac {8r+13}{25} ]=[\frac {8\cdot 25+13}{25}]=8$ and $[\frac r3]=[\frac {25}3]=8$.

So $[\frac {8n + 13}{25}]-[\frac {n-12-[\frac {n-17}{25}]}3]=[\frac {8r+13}{25}]- [\frac r3]+4= 8-8+4=4$.

So we need to show that for all $17\le r < 42$ that $[\frac {8r+13}{25}]- [\frac r3]+4 =4$ or in other words that $[\frac r3] = [\frac {8r+13}{25}]$.

Let $[\frac r3] =m$ then $m \le \frac r3 < m+1$
$3m \le r < 3m + 3$
$24m + 13 \le 8r+13 < 24m + 37$
$\frac {24m + 13}{25} \le \frac {8r+13}{25} < \frac {24m + 37}{25}$
$m + (\frac {13}{25}- \frac 1{25}m) \le \frac {8r+12}{25} < (m+1) + (\frac {12}{25} -\frac 1{25}m)$.

If we can show $m \le m + (\frac {13}{25}- \frac 1{25}m) \le \frac {8r+12}{25} < (m+1) + (\frac {12}{25} -\frac 1{25}m)\le m+1$ we'd be golden.

Now $\frac 1{25}m > \frac {13}{25} \iff m> 13\iff m\ge 14 \iff 3m\ge 42$. but $3m\le r < 42$ so that never occurs.

So $\frac {13}{25}-\frac 1{25}m \ge 0$ and

So $m \le m + (\frac {13}{25}- \frac 1{25}m) \le \frac {8r+13}{25}$ always.

Unfortunately we can't do the same to show $(m+1) + (\frac {12}{25} -\frac 1{25}m)\le m+1$.

We do have $\frac {12}{25}>\frac 1{25}m \iff m> 12\iff m\ge 39$ so $39 \le 3m \le r$ will occur when $r = 39, 40, 41$.

In these cases we must show $m+ 1 \le \frac {8r+12}{25} < (m+1) + (\frac {12}{25} -\frac 1{25}m)$ does not occur in these cases. (in all other cases we will have $m \le \frac {8r+13}{25} < (m+1) + (\frac {12}{25} - \frac 1{25}m)\le m+1$)

$\frac {8r + 12}{25} \ge m+1\iff 8r\ge 25m+13\iff r \ge \frac {25}8m + \frac {13}8$ but But that would require $3m+1 < \frac{25}8m +\frac {13}8 \le r< 3m+3$ so $r=3m+2$. But were are only concerned with cases where $r=39, 40, 41$ or in other words $r = 41; m = 13$ is the only case where we might have:

$m < m + (\frac {13}{25}- \frac 1{25}m)< (m+1) \le \frac {8r+12}{25} < (m+1) + (\frac {12}{25} -\frac 1{25}m)$

However $\frac {8\cdot 41 + 12}{25} = 13\frac {15}{25}< m+1$ so we do not have that contradiction.

fleablood
  • 124,253
  • Good Work! One suggestion. It seems that we can shorten the proof of $\left \lfloor \frac{r}{3}\rfloor = \lfloor \frac{8r+13}{25}\right \rfloor $ a bit. From $17 \le r \le 41$ and $3m \le r \le 3m+2$, we can deduce that $5 \le m \le 13$. We can then use this to deduce that $\left \lfloor \frac{8r+13}{25} \right\rfloor=m$ – Li Kwok Keung Jul 10 '22 at 01:39
  • That's quite some work! Great (+1)! – Sayan Dutta Jul 11 '22 at 04:33