# Euler numbers formula

In this formula for Euler numbers:

\begin{equation*} A_n = i^{n+1}\sum _{k=1}^{n+1} \sum _{j=0}^k{k\choose{j}} \frac{(-1)^j(k-2j)^{n+1}}{2^ki^kk}, \end{equation*}

what is $i$? I have to generate the $n^{th}$ Euler number, and I don't have $i$.

It is not the imaginary unit, is it?

-
Actually, it is. So... yeah. But this is not a standard formula; the OEIS should have others. – Qiaochu Yuan Oct 27 '10 at 14:30
There must be better algorithms than using the formula you state. Perhaps this will have a better algorithm: emis.ams.org/journals/JIS/VOL4/CHEN/AlgBE2.pdf – Aryabhata Oct 27 '10 at 19:23
Thank you! I'll check that pdf too! – rubik Oct 28 '10 at 13:08
Note that the algorithm in the paper mentioned by @Moron can be implemented with just a one-dimensional array. – J. M. Oct 28 '10 at 14:41

Yes, it is $\sqrt{-1}$. They will all divide out in the end. A derivation of your formula is here. The $i$'s come from changing the $\sin(x)$ function to its definition in terms of $\exp(x)$
Wow! I found this: $E_{n} = 2^nE_{n}(\frac{1}{2})$ where $E_{n}(x)$ is the $n-th$ Euler polynomial – rubik Oct 27 '10 at 17:01