This site is supported by donations to The OEIS Foundation.
User:Peter Luschny/SwissKnifePolynomials
From OeisWiki
SwissKnife Polynomials and
Euler Numbers
Peter Luschny, May 2010
KEYWORDS: SwissKnife polynomials, Beta polynomials, Euler numbers,
secant numbers, tangent numbers.
Concerned with sequences:
A153641, A162660, A109449, A177762,
A122045, A009006, A001586, A000182, A000364, A000111.
Notation
We will write S_{n} for the secant numbers
T_{n} for the tangent numbers
and E_{n} for the Euler numbers
The unsigned Springer numbers are defined as
We will make use of the convention 0^{0} = 1.
SwissKnife polynomials
The secant SwissKnife polynomials
The secant SwissKnife polynomials are defined as
 (I) 
The first few of these polynomials are given in table 1.
S_{n}(x)  
S_{0}  1 
S_{1}  x 
S_{2}  x^{2}  1 
S_{3}  x^{3}  3x 
S_{4}  x^{4}  6x^{2} + 5 
S_{5}  x^{5}  10x^{3} + 25x 
S_{6}  x^{6}  15x^{4 }+ 75x^{2}  61 
S_{7}  x^{7}  21x^{5} + 175x^{3}  427x 
n  0  1  2  3  4  5  6  7 
S_{n} = S_{n}(0)  1  0  −1  0  5  0  −61  0 
G*_{n} = 2^{n}S_{n}(1/2)  1  1  −3  −11  57  361  −2763  −24611 
T_{n} = S_{n}(1)  0  1  0  −2  0  16  0  −272 
In table 2 we see the signed versions of the secant, the tangent and of the Springer numbers.
Shifted and scaled to (2^{n}/n!)S_{n}(z/2+1/2) we get a picture of the beautiful objects of our interest (see figure 1). The polynomials have two `centers´ (zeropoints) at z = −1 and z = 1 which reflects the oscillating nature of the cos function.
A recursion for the SwissKnife polynomials
To compute the secant SwissKnife polynomials S_{n}(z) we need to know the secant numbers S_{n}. If n is odd only secant numbers S_{k} with k < n are needed, which we assume to know by inductive hypotheses. If n is even the situation is different as then S_{n} <> 0. The key observation is
Now it is straightforward to give the recursion. In Maple parlance:
SecPoly := proc(n,z) option remember; local k, p; if n = 0 then 1 else p := irem(n+1,2); z^n  p + add(`if`(irem(k,2) = 1, 0, SecPoly(k,0)*binomial(n,k)*(power(z,nk)p)),k=2..n1) fi end:
The sinusoidal character of the polynomials
The scaled SwissKnife polynomials are defined as
 (II) 
Plotting ω_{n}(x) shows the sinusoidal behavior of these polynomials, which is easily overlooked in the nonscaled form. For odd index ω_{n}(x) approximates sin(x π /2) and for even index cos(x π /2) in an interval enclosing the origin. This observation expands the observation that the Euler and Bernoulli numbers have π as a common root to an continuous scale. But much more is true: the domain of sinusoidal behavior gets larger and larger as the degree of the polynomials grows. In fact ω_{n}(x) shows, in an asymptotic precise sense, sinusoidal behavior in the interval [2n/πe, 2n/πe].
From these observations follows the regular behavior of the real roots of the SwissKnife polynomials. For example the roots of ω_{n}(x) are close to the integer lattices: {±0, ±2, ±4, ...} if n is odd and {±1, ±3, ±5, ...} if n is even.
The tangent SwissKnife polynomials
The tangent SwissKnife polynomials are defined as
 (III) 
The first few of these polynomials are given in table 3.
T_{n}(x)  
T_{0}  0 
T_{1}  1 
T_{2}  2x 
T_{3}  3x^{2}  2 
T_{4}  4x^{3}  8x 
T_{5}  5x^{4}  20x^{2} + 16 
T_{6}  6x^{5}  40x^{3 }+ 96x 
T_{7}  7x^{6}  70x^{4} + 336x^{2}  272 
n  0  1  2  3  4  5  6  7 
T_{n} = T_{n}(0)  0  1  0  −2  0  16  0  −272 
G*_{n} = (−1)^{n}+2^{n}T_{n}(1/2)  1  1  −3  −11  57  361  −2763  −24611 
S_{n} = 1 − T_{n}(1)  1  0  −1  0  5  0  −61  0 
In table 4 we see the signed versions of the secant, the tangent and of the Springer numbers.
Scaled to (2^{n}/ n!)T_{n}(z) we get a nice plot of these polynomials (see figure 2). The polynomials have one `center´ at z = 0 which reflects the behavior of tanh in the neighborhood of 0.
Putting things together
Let us defined the sum of the S and T SwissKnife polynomials, weighted by p and q, which we assume to be complex values defined in a superset of the interval (1, 1).
 (IV) 
E_{n}^{(p,q)} (z)  
E_{0}  p 
E_{1}  pz + q 
E_{2}  pz^{2}+ 2zq − p 
E_{3}  pz^{3} + 3z^{2}q  3pz  2q 
E_{4}  pz^{4} + 4z^{3}q  6pz^{2}  8zq + 5p 
E_{5} 
pz^{5} + 5z^{4}q  10pz^{3}  20z^{2}q + 25pz + 16q 
E_{6} 
pz^{6} + 6z^{5}q  15pz^{4}  40z^{3}q + 75pz^{2} + 96zq  61p 
We call these polynomials the pqSwissKnife polynomials. The special case E_{n}(z) = E_{n}^{(1,1)}(z) could be called `Euler polynomials´ if this name would be at our disposal.
By comparison, the conventional Euler polynomials are, despite their name, not very nice polynomials  they have rational coefficients whereas the S_{n}(z), T_{n}(z) and our E_{n}(z) polynomials have integer coefficients and can be added much easier to the OEIS. However, our polynomials share many of the features of the Euler polynomials. So if you use the traditional Euler polynomials consider also the SwissKnife polynomials. They come for a better price and might also do the job. We give an example in the next section.
The special choice of p and q
leads to the complex SwissKnife polynomials.
Sum of alternating powers
The SwissKnife polynomials provide a general formula for alternating sums of powers similar to the formula which are provided by the Bernoulli polynomials for nonalternating sums of powers.
• Alternating sum of powers of odd integers (n ≥ 0)

• Alternating sum of powers of even integers (n ≥ 1)

• One formula for both cases: ε in {0, 1}

• In particular

Note that all this can be done with integer arithmetic only. Even an evaluation with Euler polynomials has to use rational arithmetic because the coefficients of the Euler polynomials are rational numbers  in contrast to the coefficients of the SwissKnife polynomials which are integers. Sequences covered by this formula include
A001057, A062393, A062392, A011934, A144129, A077221, A137501, A046092.
Short guide to the relevant sequences at OEIS
The secant, tangent and Euler numbers are core sequences of OEIS, can be easily found and have a rich corpus of comments. Therefore I will restrict myself here to the aforementioned polynomials.
The secant SwissKnife polynomials S_{n}(x) are in A153641. They are denoted there W_{n}(x) and introduced via the doublesum transformation applied to the KwangWu Chen sequence. Peter Bala gives the representation S_{n}(x) = 2/(n+1)B(X;n+1,x), thereby associating them with certain generalized Bernoulli polynomials.
The tangent SwissKnife polynomials T_{n}(x) are in A162660. They are denoted there V_{n}(x), called complementary SwissKnife polynomials and introduced via a doublesum transformation which will be discussed below. Also a formula is given expressing the polynomials as a binomials sum with secant numbers. Comparing this formula with our definition here gives the identity
The E_{n}^{(1,1)}(z) polynomials are in A109449, albeit with unsigned coefficients and in ascending order of powers. Again both a representation in terms of Euler polynomials as well in terms of the aforementioned transformation is given.
The definitions used here are streamlined compared to those on OEIS. Moreover the computational relations used here give a more intuitive and compact framework, building on a single recursion, described in the appendix.
A common representation
We now give a representation of the secant, tangent and Euler numbers based on a general sequencetosequence transformation.
Given a sequence F the transform of F is defined as Γ(F)
 (V) 
• Secant polynomials S_{n}(x) = Γ_{n}(σ)(x)
• Tangent polynomials T_{n}(x) = Γ_{n}(τ)(x), τ_{0} = 0 and for k > 0
• E polynomials
Summary
The SwissKnife polynomials are closely related to the family of EulerBernoulli polynomials and numbers. They come in three flavors. The secant, the tangent and the E SwissKnife polynomials are defined via the exponential generating functions
s(x,t) = exp{xt} sech(t); t(x,t) = exp{xt} tanh(t); e(x,t) = exp{xt}(sech(t) + tanh(t)).
The coefficients of the polynomials are integers, in contrast to the coefficients of the Euler and Bernoulli polynomials, which are rational numbers (see HMF, page 809). Thus the SwissKnife polynomials can be computed more easily and applied to special number theory.
The Euler, Bernoulli, Genocchi, Euler zeta, tangent as well as the updown numbers and the Springer numbers are either values or scaled values of these polynomials. The SwissKnife polynomials are also connected with the Riemann and Hurwitz zeta function. They display a strong and beautiful sinusoidal behavior if properly scaled which has its basis in the Fourier analysis of the generalized zeta function.
The first time I considered the SwissKnife polynomials was on March 2008. I was surprised that I could not find a discussion of these polynomials in the literature. Therefore I added a page describing the polynomials to the English Wikipedia. This page was deleted on (20081227) from Wikipedia on the ground that the Wikipedia editors "strongly suggest that the subject of the article is original research". (Original research is not allowed to be published on Wikipedia.) If you know an earlier mention in the literature please let me know.
Beta polynomials
Beta polynomials and Euler numbers
Let us define the Dirichlet β function as
Note that our definition is slightly different from the standard definition. We will also use the notation β(s) = β(s, 1/4).
beta := s > 2*4^(s)*(Zeta(0,s,1/4)Zeta(0,s,3/4));
The β polynomials are defined as β_{0}(z) = 1 and for n > 0
 (VI) 
In my last blog (Zeta Polynomials and Harmonic Numbers, April 2010) I used a similar definition with β(k) replaced by ζ(k) to introduce the ζpolynomials which led to a representation of the Bernoulli numbers.
A recursion for the βpolynomials is β_{0}(z) = 1 and for n > 0
 (VII) 
The first few βpolynomials are given in table 6.
β_{0}(z)  1 
β_{1}(z)  1 
β_{2}(z)  z − 1 
β_{3}(z)  z^{2} − 2z − 2 
β_{4}(z)  z^{3} − 3z^{2} − 3z + 5 
β_{5}(z)  z^{4} − 4z^{3} − 4z^{2} + 16z + 16 
β_{6}(z)  z^{5} − 5z^{4} − 5z^{3} + 35z^{2} + 35z − 61 
Some values of the β polynomials can be found in table 7.
n  0  1  2  3  4  5  6  7  8  9  10 
z = 0  1  1  −1  −2  5  16  −61  −272  1385  7936  −50521 
z = 1  1  1  0  −1  0  5  0  −61  0  1385  0 
We see the signed Euler numbers E_{n} = β_{n}(0). The unsigned Euler numbers count the alternating permutations of {1, 2, 3, ..., n}.
Note that this terminology is in accordance with R. P. Stanley's recent "A Survey of Alternating Permutations" (preliminary version of 21 September 2009), who gives the definition
And, believe it or not, even Don Knuth changed his Euler numbers in Concrete Mathematics: "I'm changing the notation for Euler numbers to agree with papers in combinatorics ...". (See the Errata page of CM.)
Now, if we take the transition from the secant numbers to the fullfledged Euler numbers (secant plus tangent) as suggested by Richard Stanley's definition of the Euler numbers seriously, is it then not natural to consider also 'new' Euler polynomials which reflect this change?
What polynomials would be more appropriate for that? The β polynomials or the E^{(1,1)}(n, z) SwissKnife polynomials? What is the relation between the β polynomials and the SwissKnife polynomials anyway? We will come back to this question after an important message by our sponsors Euler and Catalan.
Some zeta and beta values
Consider the following function
 (VIII) 
Here t(x) is defined as t(x) = cos(πx/2)/2 + sin(πx/2)/(2 − 2^{−x})
For z = 0 we get the famous EulerCatalan formulas. Once upon a time these formulas and the proof that their values are rational multiples of some power of π belonged to the 1 million dollar problems in mathematics.
Maple computes EC(n, 0) for n = 0 .. 7 as
By the standard definitions of the ζ and β functions
we see that this is the sequence
Our approach combines these important special cases of the ζ and β function in a uniform way by only referring to the beta polynomials.
Beta polynomials and SwissKnife polynomials
I am quite fond of the β polynomials. However, I think the β polynomials are just the SwissKnife polynomials in disguise. Given the secant SwissKnife polynomials this is how we can arrive at the β polynomials by a formal procedure:
Step 1: Lower the degree of the monomials by 1.
Step 2: Set constant / x to 0.
Step 3: Substitute x by z − 1.
For example S_6(x) = x^615x^4+75x^261. After step 1: x^515x^3+75x61/x. After step 2: x^515x^3+75x. After step 3: (z1)^515(z1)^3+75(z1). Expanding gives z^55z^45z^3+35z^2+35z61, which is β_6(z).
Funny how the deleted 61 reappeared! Euler numbers just pop up everywhere.
Appendix
A Maple session
# This worksheet gives a recursion # for the pqSwissKnife polynomials pqSwissKnifePoly := proc(n,z,p,q) local P,Q,SECH,TANH,power,eps,BetaPoly,SecPoly,TanPoly; # teach Maple 0^0 = 1 power := proc(u,v) `if`(u=0 and v=0,1,u^v) end: BetaPoly := proc(n, z) option remember; local k; if n = 0 then 1 else add(`if`(k mod 2 = 1, 0, binomial(n,k)*BetaPoly(k,0)*power(z1,nk1)), k = 0..n1) fi end: SECH := n > `if`(n mod 2=1,0,BetaPoly(n,0)): TANH := n > `if`(n mod 2=0,0,BetaPoly(n,(n+1) mod 2)): SecPoly := proc(n,z) local k; add(binomial(n,k)*SECH(k)*power(z,nk),k=0..n) end: TanPoly := proc(n,z) local k; add(binomial(n,k)*TANH(nk)*power(z,k),k=0..n1) end: P := `if`(p = 0, 0, SecPoly(n,z)); Q := `if`(q = 0, 0, TanPoly(n,z)); p*P + q*Q end: #  showPoly := proc(z,p,q) local i; seq(print(sort(expand(pqSwissKnifePoly(i,z,p,q)))),i=0..7)end; showPoly(z,p,q); # pqSwissKnife polynomials showPoly(z,1,0); # SecSwissKnife polynomials showPoly(z,0,1); # TanSwissKnife polynomials showPoly(z,1,1); # EulerSwissKnife polynomials showPoly(z,cos(z*Pi/2),I*sin(z*Pi/2)); # complex SwissKnife seq(pqSwissKnifePoly(i,0,1,0),i=0..12); # Secant numbers seq(pqSwissKnifePoly(i,0,0,1),i=0..12); # Tangent numbers seq(pqSwissKnifePoly(i,0,1,1),i=0..12); # Euler numbers # Springer numbers (signed) seq( 2^i*pqSwissKnifePoly(i,1/2,1,0),i=0..10); seq(12^i*pqSwissKnifePoly(i,1/2,0,1),i=0..10); # Generalized Euler numbers (signed) seq(12^i*pqSwissKnifePoly(i, 1/2,1,1),i=0..10); seq(12^i*pqSwissKnifePoly(i,1/2,1,1),i=0..10); Note the difference between Springer numbers (generalized secant/tangent numbers) and generalized Euler numbers! This gets often confused. EulerCatalan := proc(n,z) local t; t := x > cos(Pi*x/2)/2 + sin(Pi*x/2)/(22^(x)); pqSwissKnifePoly(n,z,1,0)*t(n)*(Pi/2)^(n+1)/GAMMA(n+1) end: seq(EulerCatalan(i, i mod 2), i = 0..7);
The following little routine computes five famous sequences of special numbers in mathematics (Euler, Tangent, Springer, Genocchi, Bernoulli) in a few lines, using only the power function and the binomial coefficients. It is based on an evaluation of a representation of the secant, tangent and E polynomials which we have discussed above.
SwissKnifeDecompositions := proc(type, n) local W,w,x,y; W := proc(n,k) local v, pow; pow := (a,b) > if a = 0 and b = 0 then 1 else a^b fi; if irem(k+1,4) = 0 then 0 else (1)^iquo(k+1,4)*2^(iquo(k,2)) *add((1)^v*binomial(k,v)*y*pow(x+v+1,n),v=0..k) fi end; w := proc(n) local k; print(seq(W(n,k),k=0..n)); add(W(n,k),k=0..n) end; if type = "eul" then x:=0; y:=1; w(n) elif type = "tan" then x:=1; y:=1; w(n) elif type = "spr" then x:=1/2; y:=2^n; w(n) elif type = "gen" then x:=1; y:=n+1; w(n)/2^n elif type = "ber" then x:=1; y:=n+1; w(n)/(4^(n+1)2^(n+1)) fi end: # Let us check the function: types := ["eul", "tan", "spr", "gen", "ber"]: for t in types do seq(SwissKnifeDecompositions(t,i),i=0..8) od;
New sequences for OEIS
Surprisingly the (coefficients of the) β polynomials are not yet in OEIS. Therefore I submitted these numbers to the OEIS A177762.
Here you can get a [1] pdf version of this blog.