TITLE: Prove that $\Gamma (-n+x)=\frac{(-1)^n}{n!}\left [ \frac{1}{x}-\gamma +\sum_{k=1}^{n}k^{-1}+O(x) \right ]$
QUESTION [5 upvotes]: Prove that $\Gamma (-n+x)=\frac{(-1)^n}{n!}\left [ \frac{1}{x}-\gamma +\sum_{k=1}^{n}k^{-1}+O(x) \right ]$
I don't know how to do this ?
Note that $\gamma $ is the Euler-Mascheroni constant

REPLY [3 votes]: A standard trick is to use the reflection identity $$\Gamma(-n+x) \Gamma(1+n-x) = -\frac{\pi}{\sin(\pi n - \pi x)}$$
giving, under the assumption of $n\in \mathbb{Z}$
$$
   \Gamma(-n+x) = (-1)^n \frac{\pi}{\sin(\pi x)} \frac{1}{\Gamma(n+1-x)} = (-1)^n \frac{\pi}{\sin(\pi x)} \frac{1}{\color\green{n!}} \frac{\color\green{\Gamma(n+1)}}{\Gamma(n+1-x)}
$$
Assuming $n \geqslant 0$, 
$$ \begin{eqnarray}\frac{\Gamma(n+1)}{\Gamma(n+1-x)} &=& \frac{1}{\Gamma(1-x)} \prod_{k=1}^n \frac{1}{1-x/k} \\ &=& \left(1+\psi(1) x + \mathcal{o}(x)\right) \left(1+\sum_{k=1}^n \frac{x}{k} + \mathcal{o}(x) \right) \\ &=& 1 + \left( \psi(1) + \sum_{k=1}^n \frac{1}{k} \right) x + \mathcal{o}(x)  
\end{eqnarray}$$
where $\psi(x)$ is the digamma function.
Also using 
$$
   \frac{\pi}{\sin(\pi x)} = \frac{1}{x} + \frac{\pi^2}{6} x + \mathcal{o}(x)
$$
and multiplying we get
$$
   \Gamma(n+1) = \frac{(-1)^n}{n!} \left( \frac{1}{x} + \psi(1) + \sum_{k=1}^n \frac{1}{k}  + \mathcal{O}(x) \right)
$$
Further $\psi(1) = -\gamma$, where $\gamma$ is the Euler-Mascheroni constant, arriving at your result.