<s>[INST] Calculate this sum $\sum_{x=1}^{{n}/{4}} \frac{1}{x}$ How can I calculate this sum
$$\sum_{x=1}^{{n}/{4}} \frac{1}{x}$$
for $n$ an odd integer?
Added later: For example, WolframAlpha outputs 4 - Pi/2 - Log[8] for HarmonicNumber[1/4], what are the steps that produce that? Can they be generalized for any odd number?
 [/INST] The series could be defined by
\begin{align}
S_{m} = \sum_{n=1}^{\lfloor m/4 \rfloor} \frac{1}{n}
\end{align}
where $\lfloor x \rfloor$ represents the largest integer of $x$. Now, consider the series
\begin{align}
H_{n} = \sum_{k=1}^{n} \frac{1}{k}
\end{align}
which are known as the Harmonic numbers. From this it is seen that the series in question is given by
\begin{align}
S_{m} = H_{\lfloor m/4 \rfloor}.
\end{align}
Alternatively, since $\psi(x+1) + \gamma = H_{x}$ then $S_{m} = \gamma + \psi(\frac{m}{4} + 1)$, where $\gamma$ is the Euler-Mascheroni constant and $\psi(x+1)$ is the digamma function. 
Examples of values:
\begin{align}
S_{4} &= \sum_{n=1}^{\lfloor 4/4 \rfloor} \frac{1}{n} = 1 \\
S_{5} &= \sum_{n=1}^{\lfloor 5/4 \rfloor} \frac{1}{n} = \sum_{n=1}^{1} \frac{1}{n} = 1.
\end{align}
Now, making use of 
$$J_{m} = \sum_{k=1}^{m/4} \frac{1}{k} = \gamma + \psi\left( \frac{m+4}{4} \right)$$
then
\begin{align}
J_{1} = \gamma + \psi\left( \frac{5}{4} \right) = 4 + \gamma + \psi\left( \frac{1}{4} \right)
\end{align}
It is known that $\psi\left(\frac{1}{4} \right) = - \gamma - \frac{\pi}{2} - 3\ln 2$ which leads to the result
\begin{align}
J_{1} = 4 - \frac{\pi}{2} - 3 \ln 2. 
\end{align}
For the case of $S_{3}$ it is seen that
\begin{align}
J_{3} &= \gamma + \psi\left( \frac{7}{4} \right) = 4 + \gamma + \psi\left( \frac{3}{4} \right) = 4 + \frac{\pi}{2} - 3 \ln 2. 
\end{align}
</s>