Proof of a new identity for the finite sum $\sum _{k=0}^{n-1} (-1)^k \sec \left(\frac{\pi\, k}{n}+\frac{\pi }{2 \ n}\right)$

To obtain the last identity we use the Gauss's multiplication formula: \begin{equation} \Gamma\left(nz\right)=(2\pi)^{(1-n)/2}n^{nz-(1/2)}\prod_{r=0}^{n-1}\Gamma\left(z+\frac{r}{n}\right) \end{equation} where $nz\ne 0,\pm1,\pm2\ldots$. Some modifications to the product to be evaluated are to be done. First, by changing $j=n-1-s$, we have \begin{align} P&=\prod _{j=0,j\neq k}^{n-1} \Gamma\left(\frac{k}{n}-\frac{j}{n}\right)\\ &=\prod _{s=0,s\neq n-k-1}^{n-1} \Gamma\left(\frac{k-n+1}{n}+\frac{s}{n}\right) \end{align} Now, as $k-n+1$ is a non-positive integer, we shift the arguments of 1, using the recurrence formula for the Gamma function: \begin{equation} \Gamma\left(\frac{k-n+1}{n}+\frac{s}{n}\right)=\frac{\Gamma\left(\frac{k+1}{n}+\frac{s}{n}\right)}{\frac{k-n+1}{n}+\frac{s}{n}} \end{equation} Then, \begin{align} P&=n^{n-1}\frac{\prod_{s=0,s\neq n-k-1}^{n-1}\Gamma\left(\frac{k+1}{n}+\frac{s}{n}\right)}{\prod_{s=0,s\neq n-k-1}^{n-1}(k-n+1+s)} \end{align} In the numerator, we can add the factor corresponding to $s=n-k-1$ which is $\Gamma(1)=1$ to express \begin{equation} P=n^{n-1}\frac{\prod_{s=0}^{n-1}\Gamma\left(\frac{k+1}{n}+\frac{s}{n}\right)}{\prod_{s=0,s\neq n-k-1}^{n-1}(k-n+1+s)} \end{equation} The numerator can now be evaluated with the multiplication formula with $z=(k+1)/n$: \begin{equation} \prod_{s=0,s\neq n-k-1}^{n-1}\Gamma\left(\frac{k+1}{n}+\frac{s}{n}\right)=(2\pi)^{(n-1)/2}n^{-k-1/2}\Gamma(k+1) \end{equation} The factors of the denominator $D$ are \begin{equation} -(n-k-1),-(n-k-2),\ldots,-2,-1,1,2,\ldots,k-1,k \end{equation} then, \begin{equation} D=(-1)^{n-k-1}\Gamma(n-k)\Gamma(k+1) \end{equation} Finally \begin{align} P&=n^{n-1}\frac{(2\pi)^{(n-1)/2}n^{-k-1/2}\Gamma(k+1)}{(-1)^{n-k-1}\Gamma(n-k)\Gamma(k+1)}\\ &=(-1)^{n-k+1}(2\pi)^{\frac{n-1}{2}}\frac{n^{n-k-3/2}}{\Gamma(n-k)} \end{align} Which is the expected result (up to a different sign rule. There may be a typo in the OP, as the present result seems to be numercally correct).