Take the 2-minute tour ×

In this formula for Euler numbers: $\begin{align*}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{align*}$

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

Isn't it the imaginary unit, is it?

share|improve this question
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. –  Ｊ. Ｍ. Oct 28 '10 at 14:41

1 Answer 1

up vote 7 down vote accepted

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)$

share|improve this answer
Thank you! And is this the simplest formula to generate them? I didn't find any other simpler formula –  rubik Oct 27 '10 at 16:57
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
A lot of references are found on OEIS: research.att.com/~njas/sequences/… –  Ross Millikan Oct 27 '10 at 18:13

Your Answer


