Euler Number

Author

Eric W. Weisstein
December 21, 2009

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Combinatorics/EulerNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/EulerNumber.html.

©2009 Wolfram Research, Inc. except for portions noted otherwise

Code

EulerE2[n_]:=(-1)^n EulerE[2n]

Enumeration

EulerE/@Range[20]

EulerE/@Range[0,20,2]

Digits

Length/@IntegerDigits/@EulerE/@Range[0,102,2]

EulerE/@Range[0,10,2]

Powers of 10

Length/@IntegerDigits/@EulerE[10^Range[0,4]]//Timing

Length/@IntegerDigits/@EulerE[10^Range[0,5]]//Timing

Expansion

Table[(x-I)^n,{n,10}]//Expand//ColumnForm

(Table[(x-I)^n,{n,10}]//Expand)/.x^(n_.):>Abs[EulerE[n]]

I DeleteCases[%,0]

Primes

(n=Position[EulerE/@(2Range[300]),_?PrimeQ]//Flatten)//Timing

(n=Position[EulerE/@(2Range[1000]),_?PrimeQ]//Flatten)//Timing

(n=Position[EulerE/@(2Range[1500]),_?PrimeQ]//Flatten)//Timing

2{2,3,19,227,255}

Checked up to n=3000 on Mar. 6, 2004

Digits[Abs[EulerE[2 255]]]

EulerE/@(2n)

Series

(∑_(k=0)^∞)(((x^k) (Subscript[E, k]))/(k!))==sech(x)

Sum[EulerE[k]((x^k)/(k!)),{k,0,∞}]

SeriesCoefficient[Sech[x],{x,0,n}]

GeneratingFunction[EulerE[n]/n!,n,x]

(∑_(k=1)^∞)(((x^(2 k)) (Subscript[E, 2 k]))/((2 k)!))==sech(x)-1

V6

Sum[(((-1))^k)EulerE2[k]((x^(2k))/((2k)!)),{k,∞}]//InputForm

Sum[(((((-1))^(2 k)) (x^(2 k)) EulerE[2 k])/((2 k)!)),{k,5}]

Simplify[(-1)^(2k),k∈Integers]

Series[Sech[x]-1,{x,0,10}]

SeriesCoefficient[Sech[x]-1,{x,0,n}]

-1+EulerE[0]/0!

EulerE[1]/1!

V8

Sum[((-1)^(2*k)*x^(2*k)*EulerE[2*k])/(2*k)!,{k,Infinity}]

Sum[(x^(2*k)*EulerE[2*k])/(2*k)!,{k,Infinity}]

(∑_(k=1)^∞)(( (x^(2 k)) (Subscript[E, 2 k]))/((2 k)!))==sech(x)-1

Simplify[(-1)^(2k),k∈Integers]

Sum[EulerE2[2k]((x^(2k))/((2k)!)),{k,∞}]//InputForm

Sum[(( (x^(2 k)) EulerE[2 k])/((2 k)!)),{k,5}]

Series[Sech[x]-1,{x,0,10}]

(∑_k^∞)(((((-1))^k) (x^(2 k)) (Subscript[E, 2 k]))/((2 k)!))==sec(x)-1

Sum[EulerE2[k]((x^(2k))/((2k)!)),{k,∞}]

SeriesCoefficient[Sec[x]-1,{x,0,n}]

Asymptotic

8 (Sqrt[(n/π)]) (((((4 n)/(π e))))^(2 n))

e[n_]:=8Sqrt[n/Pi](4n/Pi/E)^(2n)

N[EulerE[#]-e[#/2]&/@{50,100,150,200},20]//TableForm

(Subscript[E, 2n])∼(((-1))^n)8(Sqrt[(n/π)])(((((4n)/(πe))((480(n^2)+9)/(480(n^2)-1))))^(2n))

e[n_]:=(((-1))^n)8Sqrt[n/Pi](4n/Pi/E ((480 (n^2)+9)/(480 (n^2)-1)))^(2n)

N[EulerE[#]-e[#/2]&/@{50,100,150,200},20]//TableForm

Shank's Generalizations

Shank's Generalization (Subscript[c, a,n])

L[a_,s_,t_:10000,prec_:30]:=Plus@@Table[N[JacobiSymbol[-a,2k+1](2k+1)^(-s),prec],{k,0,t}]

c[a_,n_,t_:10000,prec_:30]:=(2n)!/Sqrt[a](2a/Pi)^(2n+1)L[a,2n+1,t,prec]

Table[EulerE[n],{n,10}]

Table[EulerE[2n](-1)^n/2,{n,10}]

Table[c[1,n],{n,5}]//Timing

Table[c[2,n],{n,5}]

Series[Cos[x]/Cos[2x],{x,0,10}]

{3/2 2!,19/8 4!,((307 )/80)6!}

Table[Coefficient[Series[Cos[x]/Cos[2x],{x,0,10}],x,2n](2n)!,{n,0,5}]

CoefficientList[Series[Cos[x]/Cos[2x],{x,0,10}],x]Table[(n)!,{n,0,10}]

Round[%]

c[a_,n_]:=Coefficient[Series[Cos[x]/Cos[a x],{x,0,2n}],x,2n](2n)!

Table[c[a,n],{a,10},{n,0,7}]//TableForm

Table[Coefficient[Series[Cos[x]/Cos[3x],{x,0,20}],x,2n](2n)!,{n,0,10}]

Timing[l=Table[c[6,n],{n,0,15}]]

Timing[l=Round[Table[c[6,n,50000,50],{n,0,15}]]]

Timing[l=Table[c[6,n,50000],{n,15}]]

Round[l]

Table[Round[Table[c[a,n,50000,50],{n,0,15}]],{a,7,10}]

Shank' s Generalization (Subscript[d, a,n])

Still need squarefree part

L[a_,s_,t_:10000,prec_:50]:=Plus@@Table[N[JacobiSymbol[-a,2k+1](2k+1)^(-s),prec],{k,0,t}]
d[a_,n_,t_:10000,prec_:50]:=(2n-1)!/Sqrt[a](2a/Pi)^(2n)L[-a,2n,t,prec]

d1[n_]:=Coefficient[Series[Tan[x],{x,0,2n}],x,2n-1](2n-1)!

Table[d1[n],{n,10}]

Table[d[1,n],{n,5}]//Timing

Table[d[2,n],{n,5}]

Round[Table[d[3,n],{n,10}]]

Timing[ll=Table[d[3,n,10000],{n,15}]]

Timing[ll=Table[d[3,n,50000],{n,15}]]

Round[l]

l={2,46,3362,515086,135274562,54276473326,30884386347362,23657073914466766,23471059057478981762,29279357851856595135406,44855282210826271011257762,82787899853638102222862479246,181184428895772987376073015175366,463938847087789978515380344866345636,1374103745898202859432151805272969445376};
FormatSequence[l,191,1,
Name->"a(n) is the generalized tangent number d(3,n).",
Index->"M2166,N0864",
Detail->"D. Shanks.  \"Generalized Euler and Class Numbers.\"  Math. Comput. 21, 689-694, 1967.  Math. Comput. 22, 699, 1968.",
html["TangentNumber"],
Author->"njas",
Error->"Extended by Eric W. Weisstein (eric@weisstein.com)",
Keyw->"easy"
]

Table[Round[Table[d[a,n,50000,50],{n,15}]],{a,7,10}]