<<

arXiv:2101.09125v1 [math.CO] 22 Jan 2021 h aiyo a of parity The cce flnt w)i n ersnainof representation any in two) length of (cycles nsadr ersnainas representation standard in permutation A preliminaries and Introduction 1. [ the of Permutation Alternating Parity A Abstract fteePD elo notersaitclpoet fexcedance of property statistical their Keywords: into look being PAPs we co PADs of by these Moreover, subclass of (PADs). a Derangements study that Alternating also We Parity the well, parity. as study odd We as well PAPs. as position, even first with the in p entry alternating parity odd with an deal We alternatively. entries odd and even 00MSC: 2020 excedance 1 aiyatraigpruain trigwt nodinteg odd an with starting alternating Parity orsodn author. Corresponding a b eateto ahmtc,Cleeo aua n Computat and Natural of College , of Department ´ preetd aheaiuse nomtqe P97Uni 907 BP Informatique, Math´ematiques et D´epartement de nvriy ..o 16 di bb,Ehoi;emi:f e-mail: Ethiopia; Ababa, Addis 1176, P.O.Box University, aiy aiyatraigpruain aiyatraigderang alternating parity permutation, alternating parity parity, 50,0A5 05A19 05A15, 05A05, π sabjcinfo h e [ set the from a is rte eahwKebede Getachew Frether naaaio aaacr -al [email protected] e-mail: Madagascar; Antananarivo, π π = sdfie steprt ftenme ftranspositions of the of parity the as defined is π (1) π (2) n · · · 1a = ] aj Rakotondrajao Fanja , n π = ] { π ( 1 n , sapouto rnpstos One transpositions. of product a as ,o stepouto ijitcycles. disjoint of product the as or ), 2 { n , . . . , 1 , 2 n , . . . , estedAtnnrv,101 versit´e d’Antananarivo, oa cecs di Ababa Addis Sciences, ional } [email protected] oisl n ewl rt it write will we and itself to } sapruainwith permutation a is . sdrn h parity the nsidering ruain having ermutations b on h PAPs the count derangements ement, er n c way of determining the parity of π is by obtaining the sign of ( 1) − , where c is the − number of cycles in the cycle representation of π. That is, if the sign of π is -1, then π is called an odd permutation, and an even permutation otherwise. For example, the permutation 42178635= (1 4 7 3)(2)(5 8)(6), of length 8, is even since it has sign 1. All basic definitions and properties not explained here can be found in for example [8] and [4].

According to [9], a Parity Alternating Permutation over the set [n] is a permutation, in standard form, with even and odd entries alternatively (in this general sense). The set of all parity alternating permutations is a of the S , the Pn n group of all permutations over [n]. The of the set set has been studied lately Pn in relations to other number such as Eulerian numbers (see [10, 9]).

However, in this paper we will deal only with the parity alternating permutations which in addition have an odd entry in the first position; and we call them PAPs. It can

be shown that the set Pn containing all PAPs over [n] is a subgroup of the symmetric group S and also of the group . We consider this kind of permutations because, n Pn for odd n there are no parity alternating permutations over [n] beginning with an even . Avi Peretz determined the number that count the number of PAPs (see A010551). Unfortunately, we could not find any details of his work. In A010551, we can also find the exponential generating function of these numbers due to Paul D. Hanna. Since there is no published proof of this formula we prove it here, as Theorem 2.2. Moreover, the numbers that count the PAPs with even parity and with odd parity (which were not studied before) are determined.

By pn we denote the cardinality of the set Pn of all PAPs over [n]. Let φn denote a map

n n from Pn to S S that relates a PAP σ to a pair of permutations (σ1, σ2) in the set ⌈ 2 ⌉ × ⌊ 2 ⌋ n n σ(2i 1)+1 σ(2i) S S , in such a way that σ1(i)= − and σ2(i)= . It is easy to see that ⌈ 2 ⌉ × ⌊ 2 ⌋ 2 2 this map is a bijection. For example, the PAPs 5 2 1 4 3 6 7 and 7 4 5 6 3 2 1 over [7] are mapped to the pairs (3124, 123) and (4321, 2 3 1), respectively. If we consider a PAP

2 σ in cycle representations, then each cycle consists of of the same parity. Thus,

we immediately get cycle representation of σ1 and σ2. For instance, the cycle form of the two PAPs above are (153)(7)(2)(4)(6) and (17)(35)(246) which correspond to the pairs ((132)(4), (1)(2)(3)) and ((14)(23), (1 2 3)), respectively. (Unless stated otherwise we will always use (disjoint) cycle representation of permutations.) Another way of looking at the mapping φn is that σ1 and σ2 correspond to the parts that contain the odd and even integers in σ, respectively. Therefore, studying PAPs is similar to studying the two permutations that correspond to the even and the odd integers in the PAP separately and then combining the properties. In Table 1, we give a short summary of properties that permutations and PAPs satisfy (for detailed discussions, see Section 2).

Permutations PAPs

Seq 1, 1, 2, 6, 24, 120,.... (A000142) 1, 1, 1, 2, 4, 12,.... (A010551)

2√4 x2+2 cos−1(1 x2/2) EGF 1 − − 1 x (2 x)√4 x2 − − − Even (seq) 1, 1, 1, 3, 12, 60,.... (A001710) 1, 1, 1, 1, 2, 6, 18, 72,... Odd (seq) 1, 1, 1, 3, 12, 60,.... (A001710) 0, 0, 0, 1, 2, 6, 18, 72,...

x2 √4 x2+cos−1 1 2 x2 −  − 2  x2 x 1 Even (EGF) − + + + 2 2x (2 x)√4 x2 4 2 2 − − − 2 2 −1 x 2 √4 x +cos 1 2 Odd (EGF) x −  − 2  x x 1 2 2x (2 x)√4 x2 4 2 2 − − − − − − Table 1: A comparison table of permutations and PAPs (EGF mean exponential generating function).

One interesting subset of S is the set D of derangements. For d = D , we have a n n n | n| well known relation

dn =(n 1)[dn 1 + dn 2], d0 = 1 and d1 =0 (1) − − − for n 2. A proof of this relation may be found in any textbook on combinatorics, but ≥ we will have later use of the following bijection due to Mantaci and Rakotondrajao ([6]).

They define ψn to be the bijection between Dn and [n 1] (Dn 1 Dn 2) as follows: − × − ∪ −

3 (1) let Dn denote the set of derangements over [n] having the integer n in a cycle of length (2) greater than 2, and Dn be the set of derangements over [n] having n in a transposition.

These two sets are disjoint and their union is D . Then for δ D define ψ (δ)=(i, δ′), n ∈ n n 1 where i = δ− (n) and δ′ is the derangement obtained from

(1) δ Dn by removing n or • ∈ (2) δ Dn by removing the transposition (i n) and then decreasing all integers • ∈ greater than i by 1.

For instance, the pairs (2, (152)(34)) and (2, (1 2)(3 4)) correspond to the derangements (1526)(34) and (13)(45)(26), respectively, for n = 6. We denote the restricted bijec- (1) (2) tions ψn (1) and ψn (2) by ψn and ψn , respectively. |Dn |Dn

Another important, and more difficult to prove, recurrence relation that the numbers dn satisfy is

n dn = ndn 1 +( 1) , d0 =0 (2) − −

for n 1. We will later make a use of the bijection τn : ([n] Dn 1) Fn Dn En ≥ × − \ −→ \ given by the second author ([7]) proving the recurrence. Where En is the set containing the derangement ∆ = (12)(34) (n 1 n) for even n, and is empty for odd n. F n ··· − n is the set containing the pair (n, ∆n 1) when n is odd, and is empty when n is even. − Thus, the inverse ζn of τn relates an element of [n 1] Dn 1 with every derangement − × − over [n] that has the integer n in a cycle of length greater than 2, and an element of

n Dn 1 Fn with every derangement over [n] in which n lies in a transposition. { } × − \

Classifying derangements by their parity, we denote the number of even and odd de- e o e o rangements over [n] by dn and dn, respectively. Clearly dn = dn + dn. Moreover, the e o numbers dn and dn satisfy the relations

e o o o e e dn =(n 1)[dn 1 + dn 2] and dn =(n 1)[dn 1 + dn 2], (3) − − − − − − for n 2 with initial conditions de = 1, de = 0, do = 0, and do = 0 ([6], Proposition ≥ 0 1 0 1 4.1).

4 We will put a major interest on Parity Alternating Derangements (PADs) which are the derangements which also are parity alternating permutations starting with odd integers. Let d denote cardinality of the set of PADs D = D P . The restricted bijection n n n ∩ n n n Φn = φn Dn : Dn D D will let us consider the odd parts and the even parts of | −→ ⌈ 2 ⌉ × ⌊ 2 ⌋ any given PAD regarded as ordinary derangements with smaller length than the length of the PAD. The mapping Φn plays the central role in our investigations. In Table 2, we display the connection of ordinary derangements and PADs (for detailed discussions, see Section 3). Finding explicit expressions for some of the generating functions are still open questions. On the other hand the EGF for the PADs for example is the solution to an eighth order differential equation with polynomial coefficients, and also is expressible in terms of Hadamard products of some known generating functions.

Derangements PADs

Seq 1, 0, 1, 2, 9, 44,... (A000166) 1, 0, 0, 0, 1, 2, 4, 18, 81, 396,...

e−x EGF 1 x open −

RR dn =(n 1)[dn 1 + dn 2] relation (4) − − − n RR dn = ndn 1 +( 1) relation (5) − − Even (seq) 1, 0, 0, 2, 3, 24, 130,... (A003221) 1, 0, 0, 0, 1, 0, 4, 6, 45, 192, 976 ... Odd (seq) 0, 0, 1, 0, 6, 20, 135,... (A000387) 0, 0, 0, 0, 0, 2, 0, 12, 36, 204, 960,...

(2 x2)e−x − Even (EGF) 2(1 x) open − x2e−x Odd (EGF) 2(1 x) open − e o o Even (RR) dn =(n 1)[dn 1 + dn 2] relation (6) − − − o e e Odd (RR) dn =(n 1)[dn 1 + dn 2] relation (7) − − − n 1 n 2 n 2 n 2 Even - Odd ( 1) − (n 1) ( 1) − −2 −2 − − − l mj k Table 2: A comparison table of derangements and PAPs, RR represents recurrence relation.

In section 4, we study excedance distribution over PADs by means of the corresponding

5 distributions for the two derangements obtained by Φn.

2. Parity Alternating Permutations (PAPs)

As we stated in the introduction, we use splitting method by the mapping φn in the study of PAPs. One application of this is that the number of PAPs of length n is

n n pn = S S = n/2 ! n/2 !. | ⌈ 2 ⌉|| ⌊ 2 ⌋| ⌈ ⌉ ⌊ ⌋

n 0123456 7 8 9 10

pn 1 1 1 2 4 12 36 144 576 2880 14400

∞ Table 3: First few terms of the sequence pn 0 . { }

Proposition 2.1. The numbers pn satisfy the recurrence relation

pn = n/2 pn 1, ⌈ ⌉ − for n 1 and p =1. ≥ 0

Proof. First let us define a mapping ωn : Sn [n] Sn 1 by −→ × −

ωn(π)=(i, π′),

1 where π′ is obtained from π S by removing the integer n, and i = π− (n). One can ∈ n easily see that ωn is a bijection.

Now let us take a PAP σ over [n]. Then φn maps σ to a pair (σ1, σ2). Define then a n mapping Ω : Pn Pn 1 as follows: for n =2m −→ 2 × − h i 1 Ω(σ)= i, φ2−m(σ1, σ2′ ) ,  where (i, σ2′ )= ωm(σ2), and for n =2m +1

1 Ω(σ)= i, φ2−m+1(σ1′ , σ2) ,  6 where (i, σ1′ )= ωm+1(σ1). The mapping Ω is a bijection since ωn is a bijection for every n 1. In any case, there are n possibilities for i. ≥ 2  

As a consequence, we get the following theorem.

xn Theorem 2.2. The exponential generating function P (x)= n 0 pn n! of the sequence ≥ P p ∞ has the closed formula { n}n=0 2 1 x 2 cos− (1 ) P (x)= + − 2 . 2 x x2 − (2 x) 1 − r − 4

Proof. Based on the recurrence relation in Proposition 2.1, we obtain the following relations x x 1 x P0(x)= P1(x) + 1 and P1(x)= P0(x)+ P0(t) dt, 2 2 2 Z0 x2n x2n+1 where P0(x) = n 0 p2n (2n)! and P2(x) = n 0 p2n+1 (2n+1)! . Clearly, P (x) = P0(x)+ ≥ ≥ P P P1(x). Additionally, P0(x) satisfies the differential equation x2 x2 +2 1 1 P ′(x)= P (x) .  − 4  0 2x 0 − x Thus, we obtain the formulas 1 x 1 x 4 4x sin− 8 8x sin− 2 P (x)= + 2 and P (x)= + 2 . 0 4 x2 (4 x2)3/2 1 4x x3 x(4 x2)3/2 − x − − − − Therefore, 2 1 x 2 cos− (1 ) P (x)= + − 2 . 2 x x2 − (2 x) 1 − r − 4

e o For classification of PAPs in terms of their parity, we use Pn and Pn to denote the set of e o even PAPs and odd PAPs, respectively, and pn and pn as their cardinality, respectively. Thus,

e o pn = pn + pn.

7 n 0123456 7 8 9 10 e pn 1 1 1 1 2 6 18 72 288 1440 7200 o pn 0 0 0 1 2 6 18 72 288 1440 7200

e ∞ o ∞ Table 4: First few terms of the sequences p 0 and p 0 . { n} { n}

Our goal is now to study the relationships between these two sequences.

e o Theorem 2.3. The numbers pn and pn satisfy the recurrence relations

e o e pn = (n 1)/2 pn 1 + pn 1 ⌊ − ⌋ − − o e o pn = (n 1)/2 pn 1 + pn 1, ⌊ − ⌋ − − for n 1, with initial conditions pe =1 and po =0. ≥ 0 0

e o Proof. Let Sn and Sn be the set of even and odd permutations, respectively. Define two e e o e o o e o mappings ωn : Sn [n 1] Sn 1 Sn 1 and ωn : Sn [n 1] Sn 1 Sn 1 by −→ − × − ∪ − −→ − × − ∪ −

(i, π′), if i = n (j, π′), if j = n ωe (π)=  6 and ωo (π)=  6 , n  n  π′′, otherwise π′′, otherwise    1  respectively, where i = π− (n), π′ is obtained from π by removing the integer n, and π′′ is obtained from π by removing the cycle (n), for π Se. Similarly for ωo . It is easy to ∈ n n e o see that both mappings ωn and ωn are .

e The mapping ωn changes the parity of π when it results in π′ and preserves when it n c n 1 c results in π′′. This is because the signs of π, π′ and π′′ are ( 1) − , ( 1) − − , and − − n 1 c+1 o ( 1) − − , respectively, where c is the number of cycles in π. For the mapping ω we − n apply similar argument.

Now consider a PAP σ in Pn. Then φn maps σ in to a pair (σ1, σ2). Following the notation

8 e e n 1 o in the proof of Proposition 2.1, let us define two mappings Ω : Pn −2 Pn 1 −→ h i × − ∪ e o o n 1 e o   Pn 1 and Ω : Pn −2 Pn 1 Pn 1 as follows: − −→ × − ∪ − h i 1. when n is even

1 n (i, φn− (σ1, σ2′ )) , if i = Ωe(σ)=  6 2 and  1 φn− (σ1, σ2′′), otherwise   1 n (i, φn− (σ1, σ2′ )) , if i = Ωo(σ)=  6 2 ,  1 φn− (σ1, σ2′′), otherwise

1 n  e where i = σ2− ( ), and both σ2′ , σ2′′ are obtained from σ2 by the mapping ω n when 2 2 e o o σ Pn and by the mapping ω n when σ Pn , ∈ 2 ∈ 2. when n is odd

1 n+1 (j, φn− (σ1′ , σ2)) , if j = Ωe(σ)=  6 2 and  1 φn− (σ1′′, σ2), otherwise   1 n+1 (j, φn− (σ1′ , σ2)) , if j = Ωo(σ)=  6 2 ,  1 φn− (σ1′′, σ2), otherwise

1 n+1  e where j = σ1− ( 2 ), and both σ1′ , σ1′′ are obtained from σ1 by the mapping ω n+1 2 e o o when σ Pn and by the mapping ω n+1 when σ Pn. ∈ 2 ∈

Since ω is bijection for n 2, both Ωe and Ωo are bijections too. Note that in both n ≥ n 1 n n+1 mappings there are − possibilities for i (i = ) and similarly for j (j = ). 2 6 2 6 2   Proposition 2.4. For any positive integer n 3, we have ≥ e o pn = pn.

Proof. Multiplying a PAP by a transposition (1, n) if n is odd, or by (1, n 1) if n is − even, we obtain a PAP having opposite parity. This multiplication means swapping the first and the last odd integer of a PAP in standard representation. It creates a bijection e o between Pn and Pn .

9 By applying Proposition 2.4 and considering p(x), we get:

e Corollary 2.5. The exponential generating functions of the sequences pn n 0 and { } ≥ o pn n 0 have the closed forms { } ≥ 1 x2 1 x2 P e(x)= P (x)+ + x +1 and P o(x)= P (x) x 1 . 2  2  2  − 2 − −  

3. Parity Alternating Derangements (PADs)

As a result of the bijection Φn in the introduction above, we can determine the number dn of PADs over [n] as follows:

n/2 n/2 ⌈ ⌉ ⌊ ⌋ ( 1)i+j dn = d n/2 d n/2 = n/2 ! n/2 ! − . ⌈ ⌉ ⌊ ⌋ ⌈ ⌉ ⌊ ⌋ j! i! Xj=0 Xi=0

n 0123456 7 8 9

dn 1 0 1 2 9 44 265 1854 14833 133496

dn 100012 4 18 81 396

Table 5: First few values of dn and dn.

In the next theorem we give a formula for the number of PADs, connected to the relation (1).

Theorem 3.1. The number of PADs over [n] satisfy the recurrence relation

dn = s dn 1 +(n 2 s)(dn 3 + dn 4) , (4) − − − − −  n n 1 2n 3 ( 1) where s = − = − − − , for n 4, with initial conditions d =1, d =0, d =0 2 4 ≥ 0 1 2   and d3 =0.

10 Proof. The proof is splitted into two cases, for PADs over a set of odd and even sizes. Let (δ , δ ) be the corresponding pair of a PAD δ D under the mapping Φ . Define 1 2 ∈ n n a mapping Ψ : Dn [s] (Dn 1 [n 2 s] (Dn 3 Dn 4)) as follows: −→ × − ∪ − − × − ∪ −

Case I: for odd n, depending on the following two elective properties of δ, the mapping Ψ will be defined as:

n+1 1. in the event of the largest entry 2 of δ1 being in a cycle of length greater than 2, we let

1 Ψ(δ)= i, Φn− (δ1′ , δ2) ,  (1) where (i, δ1′ )= ψ n+1 (δ1); 2 n+1 2. in the event when 2 lies in a transposition in δ1, we distinguish two cases: • n 1 if the largest entry −2 of δ2 is contained in a cycle of length greater than 2, then

1 Ψ(δ)= i, j, Φn− (δ1′ , δ2′ ) ,  (2) (1) where (i, δ1′ )= ψ n+1 (δ1) and (j, δ2′ )= ψ n−1 (δ2); 2 2 • n 1 if −2 is contained in a cycle of length 2 in δ2, then

1 Ψ(δ)= i, j, Φn− (δ1′ , δ2′ ) ,  (2) (2) where (i, δ1′ )= ψ n+1 (δ1) and (j, δ2′ )= ψ n−1 (δ2). 2 2

Case II: for even n,

n 1. in the event of the largest entry 2 of δ2 lies in a cycle of length greater than 2, we let

1 Ψ(δ)= i, Φn− (δ1, δ2′ ) ,  (1) where (i, δ2′ )= ψ n (δ2); 2

11 n 2. in the event when 2 being in a transposition in δ2, we distinguish two cases: • n if the largest entry 2 in δ1 contained in a cycle of length greater than 2, then

1 Ψ(δ)= i, j, Φn− (δ1′ , δ2′ ) ,  (1) (2) where (i, δ1′ )= ψ n (δ1) and (j, δ2′ )= ψ n (δ2); 2 2 • n if 2 contained in a cycle of length 2 in δ1, then

1 Ψ(δ)= i, j, Φ2−n (δ1′ , δ2′ ) ,  (2) (2) where (i, δ1′ )= ψ n (δ1) and (j, δ2′ )= ψ n (δ2). 2 2

Since ψ is a bijection for any n 2, one can easily conclude that Ψ is a bijection too. n ≥ n 1 n 2 Note that in both cases there are − = s possibilities for i and − = n 2 s 2 2 − − possibilities for j. Thus, the formula in the Theorem follows.  

The next theorem is connected to the relation (2).

Theorem 3.2. The number dn of PADs also satisfies the relation

s dn = sdn 1 +( 1) dn s, (5) − − − n n 2n+1 ( 1) where s = = − − , for n 1 with d =0, d =1 and d =1. 2 4 ≥ 1 0 0  

Proof. Distinguishing by means of the parity of n, we can write the relation (5) as:

s dn = ds sds 1 +( 1) when n is even, and − − s  dn = sds 1 +( 1) ds 1 when n is odd. − − −  Now, take a PAD δ in Dn and introduce two mappings as:

• Z0 : Ds Es Ds [s] Ds 1 Fs Ds by \ × −→ × − \ ×   −1 Φn ids ζs h id Φn × × 1 δ ↽⇀ (δ1, δ2) ↽ ⇀ δ1, (i, δ2′ ) ↽⇀ (i, (δ1, δ2′ )) ↽ ⇀ i, Φn− (δ1, δ2′ ) , −1 −−Φ−−n −−−−id−−−−s τs −−h −−−−id−−−−Φn ×  ×  and

12 • Z1 : Ds Es Ds 1 [s] Ds 1 Fs Ds 1 by \ × − −→ × − \ × − Φn  ζs ids−1 h1 id Φn × × 1 δ ↽⇀ (δ1, δ2) ↽ ⇀ (i, δ1′ ), δ2 ↽⇀ i, (δ1′ , δ2) ↽ ⇀ i, Φn− (δ1′ , δ2) . −1 −1 −−Φ−−n −−−−−τ−−−−−s ids−1 −h−2 −−−−id−−−−Φn ×   × 

Note that h, h1, and h2 are the obvious recombination maps. Since all the functions we used to define the two mappings Z0 and Z1 are injective, both Z0 and Z1 are bijection mappings.

e o In order to classify PADs with respect to their parity, we let Dn and Dn denote the set of even and odd PADs over [n], respectively. Moreover, de = De and do = Do . n | n| n | n| e o Obviously, dn = dn + dn.

n 01234567 8 9 10 e dn 1 0 0 0 1 0 4 6 45 192 976 o dn 0 0 0 0 0 2 0 12 36 204 960

Table 6: First few values of the number of even and odd PADs. Proposition 3.3. The numbers of even and odd PADs satisfy the relations

e e n e n o n o n dn = d d + d d , ⌊ 2 ⌋ ⌈ 2 ⌉ ⌊ 2 ⌋ ⌈ 2 ⌉

o e n o n e n o n dn = d d + d d , ⌊ 2 ⌋ ⌈ 2 ⌉ ⌈ 2 ⌉ ⌊ 2 ⌋ for n 0, with initial conditions de =1, de =0, do =0, and do =0. ≥ 0 1 0 1

n n Proof. Let δ be a PAD over [n]. Then, there exist δ1 D and δ2 D such ∈ ⌈ 2 ⌉ ∈ ⌊ 2 ⌋ that Φ (δ)=(δ , δ ). If δ De , then δ and δ must have the same parity. Thus, n 1 2 ∈ n 1 2 e e e o o e dn = d n d n + d n d n . If δ Dn, then δ1 and δ2 must have opposite parities. Hence, ⌊ 2 ⌋ ⌈ 2 ⌉ ⌊ 2 ⌋ ⌈ 2 ⌉ ∈ o e o e o dn = d n d n + d n d n . ⌊ 2 ⌋ ⌈ 2 ⌉ ⌈ 2 ⌉ ⌊ 2 ⌋ Corollary 3.4. The number of PADs with even parity and with odd parity satisfy the recurrence relations

e o e e dn = s dn 1 +(n 2 s)(dn 3 + dn 4) (6) − − − − − o e o o  dn = s dn 1 +(n 2 s)(dn 3 + dn 4) , (7) − − − − −  13 n n 1 2n 3 ( 1) e o where s = − = − − − , for n 4 with initial conditions d = 1, d = 0, and 2 4 ≥ 0 0 e o   di = di =0 for i =1, 2, 3.

Proof. It is enough to clarify the effect of the bijection ψn on the parity of a derangement over [n], the rest is just applying the bijection Ψ from the proof of Theorem 3.1.

n 1 c (1) n 2 (c 1) n 1 c Letting δ be in D , δ′ has sign either ( 1) − − if δ Dn ,or( 1) − − − =( 1) − − n − ∈ − − (2) if δ Dn . Here δ′ is the derangement obtained from δ by applying ψ , and c is the ∈ n number of cycles in the cycle representation of δ. This means, the bijection ψn changes the parity of a derangement.

Definition 3.5. Let δ be a derangement over [n] in standard cycle representation and let C = (1 a a ) be the first cycle. Following [3], an extraction point of δ is an 1 2 ··· m entry e 2 if e is the smallest number in the set 2,...,n a for which C does ≥ { }\{ 2} 1 not end with the numbers of 2,...,e a written in decreasing order. The (n 1) { }\{ 2} − derangements, δ = (1 i n n 1 i + 2 i +1 i 1 i 2 3 2) for i [2, n], n,i − ··· − − ··· ∈ that do not have extraction points are called the exceptional derangements and the set of exceptional derangements is denoted by Xn. Note that the extraction point (if it exists) must belong to the first or the second cycle.

Following this approach we may introduce:

Definition 3.6. We call the PAD

1 n n Φn− (δ ,i, δ ,j), for i 2, n/2 and j 2, n/2 ⌈ 2 ⌉ ⌊ 2 ⌋ ∈ ⌈ ⌉ ∈ ⌊ ⌋     an exceptional PAD and we let denote the set containing them. Xn Example 3.7. If n =8, then

1 1 1 1 1 = Φ− (δ , δ ), Φ− (δ , δ ), Φ− (δ , δ ), Φ− (δ , δ ), Φ− (δ , δ ), X8 { 8 4,2 4,2 8 4,2 4,3 8 4,2 4,4 8 4,3 4,2 8 4,3 4,3 1 1 1 1 Φ− (δ , δ ), Φ− (δ , δ ), Φ− (δ , δ ), Φ− (δ , δ ) 8 4,3 4,4 8 4,4 4,2 8 4,4 4,3 8 4,4 4,4 } = (1375)(2486), (1375)(2684), (1375)(2864), (1573)(2486), (1573) { (2684), (1573)(2864), (1753)(2486), (1753)(2684), (1753)(2864) . } 14 n 1 Remark 3.8. Since the exceptional derangements over [n] have sign ( 1) − , all the − n 2 n exceptional PADs in have the same parity, with sign ( 1) − =( 1) . Xn − − Remark 3.9. As it was proved in [3], the number of the exceptional derangements in X is the difference of the number of even and odd derangements, i.e., de do = n n − n n 1 ( 1) − (n 1). Chapman ([5]) also provide a bijective proof for the same formula. − − Below we give the idea of the proof due to Benjamin, Bennett, and Newberger ([3]).

Let f be the involution on D X defined by n n\ n

fn(π)= fn (1 a2 XeY Z) π′ = (1 a2 X Z)(e Y ) π′  for π in D X with the extraction point e in the first cycle; and vice versa for the other n\ n π in D X with the extraction point e in the second cycle. a is the second element in n\ n 2 the first cycle of π; X, Y , and Z are ordered subsets of [n], Y = and Z consist the 6 ∅ elements of 2, 3,...,e 1 a written in decreasing order, and π′ is the rest of the { − }\{ 2} derangement in π. Since the number of the cycles in π and fn(π) differ by one, they must have opposite parity.

Labeling de do as f , we have the following result. n− n n

Proposition 3.10. The difference fn counts the number of exceptional PADs over [n] and its closed formula is given by

n 2 n 2 n 2 fn =( 1) − − − . (8) − l 2 mj 2 k

Proof. Let δ be in D . Then Φ map δ with the pair (δ , δ ). Define a mapping F n\Xn n 1 2 from D to itself as n\Xn

1 n Φn− f (δ1), δ2 if n is odd F (δ)=   ⌈ 2 ⌉   1 n Φn− δ1, f (δ2) otherwise  ⌊ 2 ⌋   Since fn is a bijection and changes parity, F is a bijection and also δ and F (δ) have n 2 opposite parity. The leftovers, which are the PADs in with sign ( 1) − , are counted Xn − n 2 n 2 by − − . ⌈ 2 ⌉⌊ 2 ⌋ 15 n 01234 5 6 7 8 9 10 11 12

fn 1 0 0 0 1 -2 4 -6 9 -12 16 -20 25

e o Table 7: First few values the difference fn = d d . n − n

This sequence looks like an alternating version of A002620, to which Paul Barry con- structed an EGF. From [2], we learned that he used Mathematica to generate the formu- las by taking the Inverse Laplace Transform of the ordinary generating function described in [1]. However, we propose the following more direct, constructive proof.

Theorem 3.11. The exponential generating function of the difference fn has the closed form ex e x + − (2x2 +6x + 7). 8 8

Proof. From the closed formula of fn in Proposition 3.10, we have

(n 1)2 = f = de do − 2n 2n − 2n n(n 1) = f = (de do ). − 2n+1 − 2n+1 − 2n+1 Hence, n 2n 2 2 x 2 x x 3x +4 x x +3x +4 x f = (n 1) = − e + e− , and 2n (2n)! − (2n)! 8 8 Xn 0 Xn 0 ≥ ≥ 2n+1 n 2 2 x x x 3x +3 x x +3x +3 x f = n(n 1) = − e + e− 2n+1 (2n + 1)! − − n! − 8 8 Xn 0 Xn 0 ≥ ≥ Thus, x2n x2n+1 ex e x f + f = + − (2x2 +6x + 7) 2n (2n)! 2n+1 (2n + 1)! 8 8 Xn 0 Xn 0 ≥ ≥ is the desired formula.

4. Excedance distribution over PADs

In this section, we focus on excedance distribution in PADs.

16 Definition 4.1. We say that a permutation σ has an excedance on i [n] if σ(i) > i. ∈ In this case, i is said to be an excedant.

We give the notation below in the study of this property:

d = δ D : δ has k excedances , n,k |{ ∈ n }| do = δ Do(n): δ has k excedances , n,k |{ ∈ }| de = δ De(n): δ has k excedances . n,k |{ ∈ }|

Mantaci and Rakotondrajao ([6]) studied the excedance distribution in derangements, i.e., the numbers

d = δ D : δ has k excedances , n,k |{ ∈ n }| de = δ D : δ is an even derangemnt and has k excedances , n,k |{ ∈ n }| do = δ D : δ is an odd derangemnt and has k excedances . n,k |{ ∈ n }| Remark 4.2. Since the number of excedances in a derangement over [n] is in the range [1, n 1], the number of excedances of a PAD over [n] is at least 2 and at most n 2. − −

e o Proposition 4.3. The numbers dn,k, dn,k, and dn,k are symmetric, that is

e e o o dn,k = dn,n k, dn,k = dn,n k, and dn,k = dn,n k. − − −

1 Proof. The bijection from D to it self, defined as δ δ− for δ D , associates a PAD n 7→ ∈ n having k excedances with a PAD having n k exeedances and also preserves parity. −

Proposition 4.4. The excedance distribution of a PAD is given by

k 1 n n n − d ,i d ,k i, if 2 k d =  i=1 ⌈ 2 ⌉ ⌊ 2 ⌋ − ≤ ≤ ⌊ 2 ⌋ . n,k P  n k 1 n n n  − − d ,i d ,n k+i, if

17 dn,k n k 234 5 67 \ 4 1 5 1 1 6 12 1 7 18 8 1 8 1 14 51 14 1 9 1 28 169 169 28 1 10 1 42 483 884 483 42 1

Table 8: First few terms of the number of PADs in terms of number of excedances

e o dn,k dn,k n k 234 5 67 n k 234 5 67 \ \ 4 1 4 0 5 0 0 5 1 1 6 12 1 6 00 0 7 03 3 0 7 15 5 1 8 18 27 8 1 8 06 24 6 0 9 0 13 83 83 13 0 9 1 15 86 86 15 1 10 1 22 243 444 243 22 1 10 0 20 240 440 240 20 0

Table 9: First few values of dn,k in terms of their parity

Proof. To find the number of excedances of a PAD δ over [n], we sum up the number of exeedances in δ1 and in δ2, where (δ1, δ2) is the image of δ defined in Φn. Since there are dm,i derangements in Dm having i excedances, for i [1, m 1], the products dm,i dl,k i, ∈ − − for m = n and l = n , determine the number of PADs over [n] having k excedances. ⌈ 2 ⌉ ⌊ 2 ⌋ Summing up the products over the range i = 1, 2,...,k 1 will give the first formula. − The second formula follows from Proposition 4.3.

18 Corollary 4.5. The excedance distribution of PADs in terms of their parity is given by:

k 1 e n e n o n o n i=1− (d ,i d ,k i + d ,i d ,k i), if 2 k n/2 e  2 2 2 2 dn,k = ⌈ ⌉ ⌊ ⌋ − ⌈ ⌉ ⌊ ⌋ − ≤ ≤ ⌊ ⌋ , Pn k 1  e n e n o n o n i=1− − (d ,i d ,n k+i + d ,i d ,n k+i), if n/2

An immediate consequence of this Corollary is

Proposition 4.6. We have

f = de do =( 1)n max k 1, n (k + 1) n,k n,k − n,k − { − − } for n 4 and 2 k n 2. ≥ ≤ ≤ −

Proof. Mantaci and Rakotondrajao (see [6]) have proved the identity do de =( 1)n n,k − n,k − using recursive argument. Applying this with the Corollary 4.5, we get the desired formula.

Theorem 4.7. The exponential generating function for the sequence f has the closed { n,k} form 2 1 2 x ux u + u 2 u e− + e− 2u cosh √ux + sinh √ux (1 u) . (1 u)2  − √u − −  −

n n 2 k x − Proof. Let fn(u) = k=2 fn,ku and f(x, u) = n 4 fn(u) n! . From Proposition 4.6, we ≥ have P P

k 1, if 2 k m f =  − ≤ ≤ , 2m,k  2m k 1, if m

Table 10: The first few values of the difference de do . n,k − n,k for m 2. So, ≥ m 2m 2 − u2 2um+1 + u2m f (u)= (k 1)uk + (2m k 1)uk = − , 2m − − − (1 u)2 Xk=2 k=Xm+1 − m 2m 1 − um+2 + um+1 u2 u2m+1 f (u)= (k 1)uk + (2m k)uk = − − , 2m+1 − − − − (1 u)2 Xk=2 k=Xm+1 − x2m x2m+1 f(x, u)= f (u) + f (u) 2m (2m)! 2m+1 (2m + 1)! mX2 mX2 ≥ ≥ 2 1 2 x ux u + u 2 = u e− + e− 2u cosh √ux + sinh √ux (1 u) . (1 u)2  − √u − −  −

Methodological remarks

In this paper, most of our results are obtained in a way of splitting the permuta- tions into two subwords. However, this method is not always applicable. One ex- ample is the number of PADs avoiding the pattern p = 1 2. The only derangement that avoid p is (1 n )(2 n 1) ( n n+2 ), for even n, that is, the derangement over − ··· 2 2 [n] with entries in decreasing order when written in linear representation. However,

20 n+1 it does not exist if n is odd, since 2 is a fixed point. The PAD δ created from a 1 pair (δ1, δ2), by the mapping Φn− , of two even length derangements that both avoids n 2 n+2 n n+4 the pattern p is δ = (1 n 1)(3 n 3) − (2 n )(4 n 2) , which is − − ··· 2 2 − ··· 2 2 n 1 n n 3 n 2 3 4 1 2 in linear form, has length n 0 (mod 4). However, each − − − ··· ≡ pair i i+1, where i is an entry in odd position, is a subword with the occurrence of the pattern p in δ. This indicates that δ1 and δ2 avoid p but δ doesn’t. Things get even more complicated with patterns of length greater than 2.

Final Remarks: As for now, we have not been successful in finding the recurrence e o relations and generating functions for the sequences d ∞ , d ∞ , and d ∞ . { n,k}n=0 { n,k}n=0 { n,k}n=0

Acknowledgements

The first author acknowledges the financial support extended by the cooperation agree- ment between International Science Program at Uppsala University and Addis Ababa University. Special thanks go to Prof. J¨orgen Backelin, Prof. Paul Vaderlind and Dr. Per Alexandersson of Stockholm University - Dept. of Mathematics, for all their valu- able inputs and suggestions. Many thanks to our colleagues from CoRS - Combinatorial Research Studio, for lively discussions and comments.

References

[1] Paul Barry. On a central transform of integer sequences. arXiv preprint arXiv:2004.04577, 2020.

[2] Paul Barry. Private communication to the first author, 14th, December 2020.

[3] Arthur T Benjamin, Curtis T Bennett, and Florence Newberger. Recounting the odds of an even derangement. Mathematics Magazine, 78(5):387–390, 2005.

[4] Mikl´os B´ona. Combinatorics of permutations. CRC Press, 2012.

21 [5] Robin Chapman. An involution on derangements. Discrete Mathematics, 231(1):121–122, 2001.

[6] Roberto Mantaci and Fanja Rakotondrajao. Exceedingly deranging! Advances in Applied Mathematics, 30(1-2):177–188, 2003.

[7] Fanja Rakotondrajao. k-fixed-points-permutations. Integer: Electronic Jornal of Combinatorial Number Theory, 7(A36):A36, 2007.

[8] Richard P Stanley. Enumerative combinatorics volume 1 second edition. Cambridge studies in advanced mathematics, 2011.

[9] Shinji Tanimoto. Combinatorics of the group of parity alternating permutations. Advances in Applied Mathematics, 44(3):225–230, 2010.

[10] Shinji Tanimoto. Parity alternating permutations and signed eulerian numbers. Annals of Combinatorics, 14(3):355–366, 2010.

22