Solution (source code)

= Solution

For the <beta function>, split $1=t+(1-t)$ inside the integral to obtain $B(z,q)=B(z,q+1)+B(z+1,q)$. Integrating the derivative of $t^q(1-t)^z$ over $(0,1)$ gives $qB(z+1,q)=zB(z,q+1)$, since both endpoint terms vanish in the initial domain. Combining these identities yields
$$
\boxed{B(z,q)=\frac{z+q}{z}B(z+1,q).}
$$
Repeatedly apply this recurrence until $\operatorname{Re}(z+n)>0$. Each resulting expression agrees with the original integral on overlap, so it gives its unique <analytic continuation>. Possible singularities are only $z=0,-1,-2,\ldots$.

Near $z=0$, $zB(z,q)\to qB(1,q)=1$. Continuing the recurrence downwards gives
$$
\boxed{\operatorname{Res}_{z=-n}B(z,q)=\frac{(-1)^n}{n!}(q-1)(q-2)\cdots(q-n),\qquad n\ge0,}
$$
where the empty product is $1$. The recurrence shows that each singularity is at most a <simple pole>. If $q$ is not a positive integer, all these residues are nonzero and all the listed points are poles. If $q=m$ is a positive integer, poles occur only for $0\le n<m$; the later candidates are removable, as is also clear from $B(z,m)=(m-1)!/[z(z+1)\cdots(z+m-1)]$. This qualification matters when claiming a pole at every nonpositive integer.