$\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$ 
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?
 A: 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}$]
A: 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.
A: 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*}
A: 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.
