1
$\begingroup$

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?

  • 3
    Actually, it is. So... yeah. But this is not a standard formula; the OEIS should have others.2010-10-27
  • 0
    There must be better algorithms than using the formula you state. Perhaps this will have a better algorithm: http://www.emis.ams.org/journals/JIS/VOL4/CHEN/AlgBE2.pdf2010-10-27
  • 0
    Thank you! I'll check that pdf too!2010-10-28
  • 0
    Note that the algorithm in the paper mentioned by @Moron can be implemented with just a one-dimensional array.2010-10-28

1 Answers 1

7

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

  • 0
    Thank you! And is this the simplest formula to generate them? I didn't find any other simpler formula2010-10-27
  • 1
    Wow! I found this: $E_{n} = 2^nE_{n}(\frac{1}{2})$ where $E_{n}(x)$ is the $n-th$ Euler polynomial2010-10-27
  • 0
    A lot of references are found on OEIS: http://www.research.att.com/~njas/sequences/?q=A000364&sort=0&fmt=0&language=english&go=Search2010-10-27