text:
# Vector spectrum and color screening in two color QCD at nonzero 𝑇 and 𝜇

## 1 Introduction

In this note we report on a numerical investigation of the phase diagram of two color QCD in the temperature–chemical potential plane. In this theory, the fermion determinant is positive at nonzero baryon density  and lattice simulations are possible.

Several studies of this model have already appeared  and, in particular, the phase diagram in the temperature–density plane at nonzero bare quark mass has been studied in some detail . There are three different phases: a hadronic phase with confinement and spontaneous (approximate) chiral symmetry breaking, a superfluid phase with diquark condensation and a plasma phase. For a nonzero quark mass and a zero diquark source, which is our case, the superfluid line is a bonafide phase transition, the other lines are either crossover or first order transitions. It has been shown  that, for some values of $`\mu `$, either $`\overline{\psi }\psi `$ or $`\psi \psi `$ are non–monotonic function of temperature. An earlier, sketchy proposal of the phase diagram  suggests a non–monotonic behavior for the diquark condensate. Such behaviors are rather common in condensed matter (e.g. superconductors) but unusual in particle physics: that adds to the interest of two color QCD.

Our aim is to characterize the various phases and their associated phenomena by continuing the study of the spectrum of mesons and diquarks and by exploring in detail the behavior of purely gluonic observables.

Here we will discuss only a few aspects of our study: the behavior of the Polyakov loop and its correlators, and a first set of results for the vector meson and diquark spectrum. A complete presentation, which will include topological  and thermodynamics results, will appear in a future publication .

## 2 The simulations

Numerical simulations of two color QCD with eight continuum flavors have been carried out on a $`14^3\times 6`$ lattice by an HMD algorithm , for several values of temperatures, masses and chemical potentials. We have considered chemical potentials between zero and the lattice saturation and temperatures ranging from $`T0`$ to $`T>T_c`$.

Typically, we have run for O(10000) MD steps, with dt = .02 and taking measures every 40 steps.

A few test runs were performed with dt = .04 and dt = .08 in order to check that discretization errors are small at dt = .02. The accuracy of the inversion of the Dirac operator has been tested by use of the lattice Ward identity.

## 3 Color screening

It is interesting to remark that for two color QCD the Polyakov loop $`P`$ is a real quantity: hence, the Polyakov loop correlator defining the strength of the quark-quark interaction $`PP(R)/P^2`$, is the same as the quark–antiquark one $`PP^{}(R)/|P|^2`$ . This property remains true also at $`\mu 0`$.

Note however, that this is the only special feature of the Polyakov loop and its correlators in two color QCD: all of the discussion can be carried out for a generic number of color $`N_c`$. For this reason, it might well be that some of the finding presented here carry over to real QCD.

The confined phase in the quenched approximation is characterized by an interquark static potential which rises linearly at any distance $`lim_R\mathrm{}V(R)\sigma R`$, $`\sigma `$ being the string tension.

When quark degrees of freedom start to be dynamical a new phenomenon takes place. The color flux tube between two static quarks can now break by pair production of dynamical quarks popping out of the vacuum and screening the two static sources (string breaking): $`Q\overline{Q}(Q\overline{q})(q\overline{Q})`$. The potential does not rise indefinitely anymore but flattens out at sufficiently large distance $`R_0`$.

String breaking in the hadronic phase has been observed at a moderately high temperature , and it has also been suggested that the real particles present in a dense system further favors the breaking of the string .

In the following, we will study the behaviour of the interquark potential as a function of $`\mu `$, and we will contrast its behaviour with that observed as a function of temperature.

Consider the Polyakov loop at spatial coordinates $`\stackrel{}{n}=(n_1,n_2,n_3)`$

$$P(\stackrel{}{n})=(1/N_c)Tr\underset{\tau =0}{\overset{N_\tau 1}{}}U_0(\stackrel{}{n},\tau ).$$
(1)
We average $`P(\stackrel{}{n})`$ on spatial planes to build:

$$P_3(n_3)=(1/N_{s}^{}{}_{}{}^{2})\underset{n_1,n_2=1}{\overset{N_s}{}}P(n_1,n_2,n_3)$$
(2)
$`P_1`$ and $`P_2`$ are similarly defined.

By use of $`P_i(n_i)`$ we finally arrive at the zero-th momentum projected correlation function of the Polyakov line

$$PP^{}(R)=\frac{1}{3N_s}\underset{i=1}{\overset{3}{}}\underset{n_i=1}{\overset{N_s}{}}P_i(n_i)P_i^{}(n_i+R).$$
(3)
In Fig. 1 we show the results for the Polyakov loop correlators at various values of the chemical potential. At high chemical potential we observe the expected enhanced screening, since the correlation functions approach a constant value at large distance. The gap between the plateaux at $`\mu =0.2`$ and $`\mu =0.4`$ in Fig. 1 suggests the passage to a deconfined phase. We have then a direct evidence of the effect of the chemical potential on the gauge fields.

We note that the trend with chemical potential closely resembles that observed with temperature : in both cases we have signals of deconfinement.

In Fig. 2 the dependence of the Polyakov loop on $`\mu `$ (left hand side) and on $`T`$ (right hand side) is contrasted with that of the spatial Polyakov loop, superimposed in the same plots. Again we note the similarity between the behaviour at high temperature and that at high density : in both cases, only the temporal loop is affected.

These results provide a direct observation of long range screening in a dense gauge system, obtained from a first principle study of the model, further confirming other observations. They are thus providing an important confirmation of the standard expectation of the structure of a dense medium.

A more detailed analysis can give us more information on the screening properties. We note that some theoretical guidance can also be offered by low energy effective string models , which provide the following expression (simplified for the sake of the present discussion) for the point-to-point correlators:

$$PP^{}(R)=\alpha e^{\sigma _0RN_t}+(N_cN_f)^2\beta e^{2\sigma _0R_0N_t}.$$
(4)
The above equation shows the expected exponential dependence on the breaking length $`R_0`$, hence on the mass scale, and we also note the dynamical factors $`\alpha `$ and $`\beta `$. It is then reasonable to assume that they depend on temperature and density: we will address this point in our future publication.

Finally, in Fig. 3 we study the correlation between $`|P|`$ and $`\overline{\psi }\psi `$ by plotting one versus the other. We plot there two sets of data: firstly, those obtained at fixed $`\beta =1.5`$, and variable $`\mu `$. Secondly, those at $`\mu =0`$, and variable $`\beta `$. We see that chiral condensate and Polyakov loop are well correlated, for both data sets , and that the Polyakov loop looks consistently larger for the first data set $`,\beta =1.5,\mu 0`$, supporting the idea that a finite density of real particles further favors string breaking .

## 4 The vector sector

The vector meson ($`\overline{q}\gamma _iq`$) and diquark ($`q\gamma _iq`$) and antidiquark ($`\overline{q}\gamma _i\overline{q}`$) propagators at $`\mu =0`$ are constructed from the quark propagator, as explained in early work  for the scalar spectrum, modulo the inclusion of the appropriate $`\gamma `$ matrix (or, rather, of its staggered fermion representation).

From the Pauli–Gursey symmetry of the SU(2) Action, the exact degeneracy of the vector (V) meson propagator with the pseudovector (PV) diquark propagator follows, as well as that of the pseudovector meson propagator with the vector diquark propagator. Analogous degeneracies have been noted in the scalar sector .

Finite density spectroscopy analysis has been already introduced and discussed . The following symmetries should hold true in the ensemble:

$`G(t)`$ $`=`$ $`G(Tt)\text{for mesons}`$ (5)
$`G(t,\mu )`$ $`=`$ $`G(Tt,\mu )\text{for diquarks}`$ (6)
In addition to that, remember that staggered mesons contain states with different lattice parity (the ‘oscillating’ channel): for instance, the vector meson contains both the $`\rho `$ and the B particle, while the pseudovector contains the A1 and again the $`\rho `$:

$`G_V(t)`$ $`=`$ $`a(e^{(m_\rho t)}+e^{m_\rho (Tt)})+(1)^tb(e^{(m_Bt)}+e^{m_B(Tt)})`$ (7)
$`G_{PV}(t)`$ $`=`$ $`a(e^{(m_{A1}t)}+e^{m_{A1}(Tt)})+(1)^tb(e^{(m_\rho t)}+e^{m_\rho (Tt)})`$ (8)
Since mesons do not ‘feel’ the effects of the chemical potential the masses of the forward and backward propagating meson states are identical.

For $`\mu 0`$ we expect different forward and backward masses in the diquark channels, reflecting the different backward and forward propagations in the dense medium. The occurrence of condensation, in either channel, should be signaled by the appearance of a constant term at large distance.

Let us look now at the diagrams, Fig.4: the upper left diagram shows the vector and pseudovector meson propagators at low temperature, zero chemical potential. We have verified that they are degenerate with the vector diquarks of opposite parity. By increasing the temperature we observe chiral symmetry restoration in the vector channel (Fig.4, upper right diagram): all of the four vector states (mesons and diquarks) are now degenerate. At nonzero density mesons and diquarks with opposite parity are no longer degenerate, as anticipated. Let us follow independently mesons and diquarks then.

In Fig.4 , left lower diagram, we see the vector and pseudovector mesons for $`\mu >\mu _c`$: they are degenerate, as it happens at high T: of course this does not signal chiral symmetry restoration , since chiral symmetry is still broken by the diquark condensate. Simply, it tells us that the chiral condensate, which is responsible for the difference between these two propagators, is now zero. This is the same which happened with scalars. We observe also an important difference : the oscillating componenent is increased, as if the B particle contribution were more important at high density. This might indicate a significant difference of the spectral functions at high temperature and density, suggesting that the spectral concentration of the $`\rho `$ decreases at high density in comparison to that of the B meson.

One last remark concerns the behavior of vector diquarks: in addition to the expected asymmetry, we observe (Fig.4 , right lower diagram) a behaviour which is not inconsistent with a possible plateau. Obviously, also a very low mass can mimick this behaviour, and all the usual caveat apply to this observation : first of all we should study colder lattices, where condensation phenomena are more prominent. Secondly, we should check finite size scaling. If this trend were to persist for a range of lattice volumes then it could be interpreted as evidence for the predicted  vector condensation.

## 5 Summary

We have observed enhanced screening and string breaking in the critical region for chiral symmetry. We have shown that chiral condensate and screening properties are correlated both at finite temperature and finite density. These observations suggest that the (pseudo)critical line for chiral condensate and confinement run close to each other in the phase diagram of two color QCD. Moreover we noticed that, at comparable values of chiral condensate, string breaking is slightly more pronounced at finite density, and low temperature, than at zero density and finite temperature. This supports the view that recombination with real quarks in a dense system favors deconfinement .

We have observed exact degeneracies in the vector sector of the spectrum. We have studied the pattern of chiral symmetry for vector mesons and diquarks at finite temperature and density. Our results show a peculiar behaviour in the meson vector sector at high density, noticeably different from that at high temperature: spectral concentration of the B particle seems dominating over the $`\rho `$, while at high temperature the opposite holds true. Finally we have noted possible hints of vector condensation in the diquark sector.

One final remarks concerns the possibility to use two color QCD to test methods for simulating QCD at nonzero density. Some experiments with the Glasgow reweighting have already been performed , while test of the analytic continuation from imaginary chemical potential  are in progress .

## Acknowledgments

We wish to thank J.T. Lenaghan, F. Sannino, W. Schäfer, K. Splittorff and D. Toublan for interesting conversations. This work has been partially supported by MIUR. M.P. thanks the European Union Human Potential Program (contract HPRN-CT-2000-00145, Lattice QCD).


format: text

text:
# Restricted 132-alternating permutations and Chebyshev polynomials

## Abstract

A permutation is said to be alternating if it starts with rise and then descents and rises come in turn. In this paper we study the generating function for the number of alternating permutations on $`n`$ letters that avoid or contain exactly once $`132`$ and also avoid or contain exactly once an arbitrary pattern on $`k`$ letters. In several interesting cases the generating function depends only on $`k`$ and is expressed via Chebyshev polynomials of the second kind.

## 1. Introduction

The main goal of this paper is to give analogues of enumerative results on certain classes of permutations characterized by pattern-avoidance in the symmetric group $`\mathrm{SS}_n`$. In the set of alternating permutations we identify classes of restricted alternating permutations with enumerative properties analogous to results on permutations. More precisely, we study generating functions for the number of alternating permutations that avoid or contain exactly once $`132`$ and also avoid or contain exactly once an arbitrary permutation $`\tau \mathrm{SS}_k`$. In the remainder of this section, we present a brief account of earlier works which motivated our investigation, we give the basic definitions used throughout the paper, and we summarize our main results.

### 1.1. Classical patterns

Let $`\alpha \mathrm{SS}_n`$ and $`\tau \mathrm{SS}_k`$ be two permutations. We say that $`\alpha `$ contains $`\tau `$ if there exists a subsequence $`1i_1<i_2<\mathrm{}<i_kn`$ such that $`(\alpha _{i_1},\mathrm{},\alpha _{i_k})`$ is order-isomorphic to $`\tau `$; in such a context $`\tau `$ is usually called a pattern. We say that $`\alpha `$ avoids $`\tau `$, or is $`\tau `$-avoiding, if such a subsequence does not exist. The set of all $`\tau `$-avoiding permutations in $`\mathrm{SS}_n`$ is denoted $`\mathrm{SS}_n(\tau )`$. For an arbitrary finite collection of patterns $`T`$, we say that $`\alpha `$ avoids $`T`$ if $`\alpha `$ avoids any $`\tau T`$; the corresponding subset of $`\mathrm{SS}_n`$ is denoted $`\mathrm{SS}_n(T)`$.

While the case of permutations avoiding a single pattern has attracted much attention, the case of multiple pattern avoidance remains less investigated. In particular, it is natural, as the next step, to consider permutations avoiding pairs of patterns $`\tau _1`$, $`\tau _2`$. This problem was solved completely for $`\tau _1,\tau _2\mathrm{SS}_3`$ (see \[SS\]), for $`\tau _1\mathrm{SS}_3`$ and $`\tau _2\mathrm{SS}_4`$ (see \[W\]), and for $`\tau _1,\tau _2\mathrm{SS}_4`$ (see \[Bo, Km\] and references therein). Several recent papers \[CW, MV1, Kr, MV2, MV3, MV4\] deal with the case $`\tau _1\mathrm{SS}_3`$, $`\tau _2\mathrm{SS}_k`$ for various pairs $`\tau _1,\tau _2`$. Another natural question is to study permutations avoiding $`\tau _1`$ and containing $`\tau _2`$ exactly $`t`$ times. Such a problem for certain $`\tau _1,\tau _2\mathrm{SS}_3`$ and $`t=1`$ was investigated in \[R\], and for certain $`\tau _1\mathrm{SS}_3`$, $`\tau _2\mathrm{SS}_k`$ in \[RWZ, MV1, Kr\]. The tools involved in these papers include Fibonacci numbers, Catalan numbers, Chebyshev polynomials, continued fractions, and Dyck words.

Fibonacci numbers are defined by $`F_0=0`$, $`F_1=1`$, and $`F_n=F_{n1}+F_{n2}`$ for all $`n2`$.

Catalan numbers are defined by $`C_n=\frac{1}{n+1}\left(\genfrac{}{}{0pt}{}{2n}{n}\right)`$ for all $`n0`$. The generating function for the Catalan numbers is given by $`C(x)=\frac{1\sqrt{14x}}{2x}`$.

Chebyshev polynomials of the second kind (in what follows just Chebyshev polynomials) are defined by $`U_r(\mathrm{cos}\theta )=\frac{\mathrm{sin}(r+1)\theta }{\mathrm{sin}\theta }`$ for $`r0`$. Evidently, $`U_r(t)`$ is a polynomial of degree $`r`$ in $`t`$ with integer coefficients, and satisfy

(1.1)
$$U_0(t)=1,U_1(t)=2t,\text{and}U_r(t)=2tU_{r1}(t)U_{r2}(t)\text{for all}r2.$$

Chebyshev polynomials were invented for the needs of approximation theory, but are also widely used in various other branches of mathematics, including algebra, combinatorics, and number theory (see \[Ri\]). Apparently, for the first time the relation between restricted permutations and Chebyshev polynomials was discovered by Chow and West in \[CW\], and later by Mansour and Vainshtein \[MV1, MV2, MV3, MV4\], Krattenthaler \[Kr\]. These results related to a rational function

(1.2)
$$R_k(x)=\frac{U_{k1}\left(\frac{1}{2\sqrt{x}}\right)}{\sqrt{x}U_k\left(\frac{1}{2\sqrt{x}}\right)},$$

for all $`k1`$. It is easy to see that for any $`k`$, $`R_k(x)`$ is rational in $`x`$ and satisfies

(1.3)
$$R_k(x)=\frac{1}{1xR_{k1}(x)},$$

for all $`k1`$.

### 1.2. Generalized patterns

In \[BS\], there were introduced generalized permutation patterns that allow the requirement that two adjacent letters in a pattern must be adjacent in the permutation. We write a classical pattern with dashes between any two adjacent letters of the pattern, say $`1342`$, as $`1\text{-}3\text{-}4\text{-}2`$, and if we write, say $`24\text{-}3\text{-}1`$, then we mean that if this pattern occurs in a permutation $`\pi `$, then the letters in $`\pi `$ that correspond to $`2`$ and $`4`$ are adjacent (for more details, see \[C\]). For example, the permutation $`\pi =35421`$ has only two occurrences of the pattern $`23\text{-}1`$, namely the subsequences $`352`$ and $`351`$, whereas $`\pi `$ has four occurrences of the pattern $`2\text{-}3\text{-}1`$, namely the subsequences $`352`$, $`351`$, $`342`$ and $`341`$. In \[MV1, M1, M2, M3\], there were studied the number of permutations that avoid or contain exactly once $`1\text{-}3\text{-}2`$ and that also avoid or contain exactly once an arbitrary generalized pattern. The tools involved in these papers include Fibonacci numbers, Catalan numbers, Chebyshev polynomials, and continued fractions.

### 1.3. Alternating permutations

A permutation is said to be alternating if it starts with *rise* and then *descents* and rises come in turn. In other words, an alternating permutation $`\pi \mathrm{SS}_n`$ satisfies $`\pi _{2j1}<\pi _{2j}>\pi _{2j+1}`$ for all $`1j[n/2]`$, that is to say its *rise* (resp. *descent*) is equal to an odd (resp. even) index. We denote the set of all alternating permutations on $`n`$ letters by $`A_n`$. Other names that authors have used for these permutations are *zig-sag permutation* and *up down permutations*. The determination of the number of alternating permutations for the set $`\{1,2,\mathrm{},n\}`$ (or on $`n`$ letters) is known as André’s problem (see \[A1, A2\]). An example of an alternating permutation is $`14253`$. The number of alternating permutations on $`n`$ letters, for $`n=1,2,\mathrm{},10`$, is $`1`$, $`1`$, $`2`$, $`5`$, $`16`$, $`61`$, $`272`$, $`1385`$, $`7936`$, $`50521`$ (see \[SP, Sequence A000111(M1492)\]). These numbers are known as the Euler numbers and have exponential generating function $`\mathrm{sec}x+\mathrm{tan}x`$.

A permutation is said to be *up-up* (resp. *up-down*, *down-up*, *down-down*) if it starts with rise (resp. rise, descent, descent), then descents and rises (resp. descents and rises, rises and descents, rises and descents) come in turn, and ends with rise (resp. descent, rise, descent). We denote the set of all up-up (resp. up-down, down-up, down-down) permutations of length $`n`$ by $`UU_n`$ (resp. $`UD_n`$, $`DU_n`$, $`DD_n`$) for all $`n2`$ (for $`n=0,1`$ we define $`UU_n=UD_n=DU_n=DD_n=\mathrm{}`$). Clearly, for all $`n2`$,

(1.4)
$$A_n=UU_nUD_n.$$

### 1.4. Organization of the paper

In this paper we use generating function techniques to study those alternating (up-up, up-down, down-up, down-down) permutations that avoid or contain exactly once $`1\text{-}3\text{-}2`$ and that also avoid or contain exactly once an arbitrary generalized pattern on $`k`$ letters.

The paper is organized as follows. The case of alternating (up-up, up-down, down-up, down-down) permutations that avoid both $`1\text{-}3\text{-}2`$ and an arbitrary generalized pattern $`\tau `$ is treated in Section 2. We derive a simple structure for alternating (up-up, up-down, down-up, down-down) permutations that avoid $`1\text{-}3\text{-}2`$. This structure can be used for several interesting cases, including the classical pattern $`\tau =1\text{-}2\text{-}\mathrm{}\text{-}k`$ and $`\tau =2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1`$, the generalized patterns $`\tau =12\text{-}3\text{-}\mathrm{}\text{-}k`$ and $`\tau =21\text{-}3\text{-}\mathrm{}\text{-}k`$. The case of alternating (up-up, up-down, down-up, down-down) permutations that avoid $`1\text{-}3\text{-}2`$ and contain exactly once $`\tau `$ is treated in Section 3. Here again, we use the structure of alternating (up-up, up-down, down-up, down-down) permutations that avoid $`1\text{-}3\text{-}2`$ for several particular cases. The case of alternating (up-up, up-down, down-up, down-down) permutations that contain $`1\text{-}3\text{-}2`$ exactly once is treated in Sections 4 and 5 for avoiding $`\tau `$, or containing $`\tau `$ exactly once, respectively. Finally, in Section 6 we present several directions to extend and generalize the results of the previous sections, including a statistics on the set of alternating (up-up, up-down, down-up, down-down) permutations that avoid $`1\text{-}3\text{-}2`$.

Most of the explicit solutions obtained in Sections 25 involve Chebyshev polynomials of the second kind.

## 2. Avoiding $`1\text{-}3\text{-}2`$ and another pattern $`\tau `$

In this section we consider those alternating (up-up, up-down, down-up, down-down) permutations in $`\mathrm{SS}_n`$ that avoid $`1\text{-}3\text{-}2`$ and avoid another generalized pattern $`\tau `$. We begin by setting some notation. Let $`a_\tau (n)`$ denote the number of alternating permutations in $`A_n(1\text{-}3\text{-}2,\tau )`$, and let $`A_\tau (x)=_{n0}A_\tau (n)x^n`$ be the corresponding generating function.

Moreover, we define $`ud_\tau (n)`$, $`uu_\tau (n)`$, $`du_\tau (n)`$, and $`dd_\tau (n)`$ as the number of up-up, up-down, down-up, and down-down permutation in $`\mathrm{SS}_n(1\text{-}3\text{-}2,\tau )`$, respectively. We denote, the corresponding generating functions by $`UD_\tau (x)`$, $`UU_\tau (x)`$, $`DU_\tau (x)`$, and $`DD_\tau (x)`$, respectively. In this section we describe a method for enumerating alternating (up-up, up-down, down-up, down-down) permutations that avoid $`1\text{-}3\text{-}2`$ and another generalized pattern $`\tau `$ and we use out this method to enumerate $`a_\tau (n)`$ for various $`\tau `$. We begin with an observation concerning the structure of the alternating (up-up, up-down, down-up, down-down) permutations that avoid $`1\text{-}3\text{-}2`$.

Let $`\alpha \mathrm{SS}_n(1\text{-}3\text{-}2)`$; by using the block decomposition approach (see \[MV4\]) we have one possibility for block decomposition, as described in Figure 1, if $`\alpha =(\alpha ^{},n,\alpha ^{\prime \prime })`$, then every entry of $`\alpha ^{}`$ is greater than every entry of $`\alpha ^{\prime \prime }`$. Therefore, by using the block decomposition of $`\alpha `$, we get the following proposition which is the base for all the results in this section.

###### Proposition 2.1.

Let $`\alpha =(\alpha ^{},n,\alpha ^{\prime \prime })\mathrm{SS}_n(1\text{-}3\text{-}2)`$.

1. If $`\alpha UD_n(1\text{-}3\text{-}2)`$, then the block decomposition of $`\alpha `$ can have one of the following possibilities:

* $`\alpha ^{}`$ is an $`1\text{-}3\text{-}2`$-avoiding up-down permutation on the letters $`nj+1,nj+2,\mathrm{},n1`$, and either $`\alpha ^{\prime \prime }`$ is an $`1\text{-}3\text{-}2`$-avoiding up-down permutation on the letters $`1,2,\mathrm{},nj`$ or $`\alpha ^{\prime \prime }=1`$;
    * $`\alpha ^{}=n1`$ and either $`\alpha ^{\prime \prime }`$ is an $`1\text{-}3\text{-}2`$-avoiding up-down permutation on the letters $`1,2,\mathrm{},nj1`$ or $`\alpha ^{\prime \prime }=1`$.
2. If $`\alpha UU_n(1\text{-}3\text{-}2)`$, then the block decomposition of $`\alpha `$ can have one of the following possibilities:

* $`\alpha ^{}=n1`$ and either $`\alpha ^{\prime \prime }=\mathrm{}`$ or $`\alpha ^{\prime \prime }`$ is an $`1\text{-}3\text{-}2`$-avoiding up-up permutation on the letters $`1,2,\mathrm{},n2`$;
    * $`\alpha ^{\prime \prime }=\mathrm{}`$ and $`\alpha ^{}`$ is an $`1\text{-}3\text{-}2`$-avoiding up-down permutation on the letters $`1,2,\mathrm{},n1`$;
    * $`\alpha ^{}`$ is an $`1\text{-}3\text{-}2`$-avoiding up-down permutation on the letters $`nj+1,\mathrm{},n2,n1`$, and $`\alpha ^{\prime \prime }`$ is an $`1\text{-}3\text{-}2`$-avoiding up-up permutation on the letters $`1,2,\mathrm{},nj`$.
3. If $`\alpha DU_n(1\text{-}3\text{-}2)`$, then the block decomposition of $`\alpha `$ can have one of the following possibilities:

* $`\alpha ^{}=\mathrm{}`$, and $`\alpha ^{\prime \prime }`$ is an $`1\text{-}3\text{-}2`$-avoiding up-up permutation on the letters $`1,2,\mathrm{},n1`$;
    * $`\alpha ^{}`$ is an $`1\text{-}3\text{-}2`$-avoiding down-down permutation on the letters $`nj+1,\mathrm{},n2,n1`$, and either $`\alpha ^{\prime \prime }=\mathrm{}`$ or $`\alpha ^{\prime \prime }`$ is an $`1\text{-}3\text{-}2`$-avoiding up-up permutation on the letters $`1,2,\mathrm{},nj`$.
4. If $`\alpha DD_n(1\text{-}3\text{-}2)`$, then the block decomposition of $`\alpha `$ can have one of the following possibilities:

* $`\alpha ^{}=\mathrm{}`$, and $`\alpha ^{\prime \prime }`$ is an $`1\text{-}3\text{-}2`$-avoiding up-down permutation on the letters $`1,2,\mathrm{},n1`$;
    * $`\alpha ^{}`$ is an $`1\text{-}3\text{-}2`$-avoiding down-down permutation on the letters $`nj+1,\mathrm{},n2,n1`$, and either $`\alpha ^{\prime \prime }=1`$ or $`\alpha ^{\prime \prime }`$ is an $`1\text{-}3\text{-}2`$-avoiding up-down permutation on the letters $`1,2,\mathrm{},nj`$.

### 2.1. The pattern $`\tau =\mathrm{}`$

Using Proposition 2.1, we now enumerate those alternating (up-up, up-down, down-up, down-down) permutations in $`\mathrm{SS}_n`$ that avoid $`1\text{-}3\text{-}2`$.

###### Theorem 2.2.

The number of alternating permutations of length $`n`$ that avoid $`1\text{-}3\text{-}2`$ is given by $`C_{[n/2]}`$ for any $`n0`$. Moreover, for all $`n3`$,

1. the number of up-down permutations of length $`n`$ that avoid $`1\text{-}3\text{-}2`$ is given by $`C_{(n1)/2}`$,
2. the number of up-up permutations of length $`n`$ that avoid $`1\text{-}3\text{-}2`$ is given by $`C_{n/2}`$,
3. the number of down-up permutation of length $`n`$ that avoid $`1\text{-}3\text{-}2`$ is given by $`C_{(n+1)/2}`$,
4. the number of down-down permutations of length $`n`$ that avoid $`1\text{-}3\text{-}2`$ is given by $`C_{n/2}`$,

where $`C_m`$ is the $`m`$th Catalan number, such that $`C_m`$ is assumed to be $`0`$ whenever $`m`$ is a non-integer number.

###### Proof.

An alternating permutation can be either up-down, or up-up, or down-up, or down-down. If we write an equation for every case in terms of generating functions and use Proposition 2.1, then we get

$$\{\begin{array}{c}UD_{\mathrm{}}(x)=x(UD_{\mathrm{}}(x)+x)^2,\hfill \\ DU_{\mathrm{}}(x)=xUU_{\mathrm{}}(x)+xDD_{\mathrm{}}(x)UU_{\mathrm{}}(x)+xDD_{\mathrm{}}(x),\hfill \\ DD_{\mathrm{}}(x)=x(x+UD_{\mathrm{}}(x))+xDD_{\mathrm{}}(x)(x+UD_{\mathrm{}}(x)),\hfill \\ UU_{\mathrm{}}(x)=x^2(UU_{\mathrm{}}(x)+1)+xUD_{\mathrm{}}(x)+xUD_{\mathrm{}}(x)UU_{\mathrm{}}(x).\hfill \end{array}$$

Therefore, solving the above equations, we get

(2.1)
$$\begin{array}{cc}UD_{\mathrm{}}(x)=\frac{12x^2\sqrt{14x^2}}{2x},\hfill & DU_{\mathrm{}}(x)=x\left(\frac{1\sqrt{14x^2}}{2x^2}\right)^2x,\hfill \\ DD_{\mathrm{}}(x)=\frac{1\sqrt{14x^2}}{1+\sqrt{14x^2}},\hfill & UU_{\mathrm{}}(x)=\frac{1\sqrt{14x^2}}{1+\sqrt{14x^2}}.\hfill \end{array}$$

Hence, the rest is easy to check by using $`A_{\mathrm{}}(x)=1+x+UD_{\mathrm{}}(x)+UU_{\mathrm{}}(x)`$ (see Equation 1.4). ∎

Using Proposition 2.1, we now enumerate various sets of alternating (up-up, up-down, down-up, down-down) permutations in $`\mathrm{SS}_n`$ that avoid $`1\text{-}3\text{-}2`$ and nonempty generalized pattern $`\tau `$.

### 2.2. A classical pattern $`\tau =1\text{-}2\text{-}\mathrm{}\text{-}k`$

Let us start by the following example.

###### Example 2.3.

By definitions we have $`UD_1(x)=DD_1(x)=UU_1(x)=DU_1(x)=0`$, $`UD_{1\text{-}2}(x)=UU_{1\text{-}2}(x)=DU_{1\text{-}2}(x)=0`$, and $`DD_{1\text{-}2}(x)=x^2`$.

The case of varying $`k`$ is more interesting. As an extension of Example 2.3, let us consider the case $`\tau =1\text{-}2\text{-}\mathrm{}\text{-}k`$.

###### Theorem 2.4.

For all $`k2`$,

1. $`UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)={\displaystyle \frac{xU_{k3}\left(\frac{1}{2x}\right)}{U_{k1}\left(\frac{1}{2x}\right)}}`$;
2. $`DD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)={\displaystyle \frac{x^{k1}+U_{k3}\left(\frac{1}{2x}\right)}{U_{k1}\left(\frac{1}{2x}\right)}}`$;
3. $`UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)={\displaystyle \frac{U_{k3}\left(\frac{1}{2x}\right)}{U_{k1}\left(\frac{1}{2x}\right)}}`$;
4. $`DU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)={\displaystyle \frac{x^{k1}+U_{k3}\left(\frac{1}{2x}\right)}{xU_{k1}\left(\frac{1}{2x}\right)}}x`$.

###### Proof.

Let us verify (1). By using Proposition 2.1, we have

(2.2)
$$UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)=x(UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)+x)(UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x)+x),$$

equivalently,

$$UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)=\frac{x^2(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))}{1x^2xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x)}.$$

Now, assume that (1) holds for $`k1`$. So, by Identity 1.2 we have that

$$UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x)=x^3R_{k3}(x^2)R_{k2}(x^2).$$

Therefore,

$$UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)=\frac{x^2(x+x^3R_{k3}(x^2)R_{k2}(x^2))}{1x^2x^4R_{k3}(x^2)R_{k2}(x^2)},$$

and using Identity 1.3, we get

$$UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)=x^3R_{k2}(x^2)R_{k1}(x^2).$$

So, by Equation 1.2, (1) holds for $`k`$. Hence, by induction on $`k`$ together with Example 2.3 we get the desired result as claimed in (1).

Let us verify (2). By using Proposition 2.1, we get

$$DD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)=x(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x))(1+DD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x)).$$

Using (1), Equation 1.3, and induction on $`k`$ together with Example 2.3 we get the desired result as claimed in (2).

Similarly, we have

$$\begin{array}{c}UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)=x(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)),\hfill \\ DU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)=xUU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)+xDD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x)(UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)+1),\hfill \end{array}$$

hence, by using Equation 1.3 and the cases (1)–(2), we get the desired result as claimed in (3) and (4). ∎

As a corollary to Theorem 2.4 and Equation 1.4, we get the number of alternating permutations in $`A_n(1\text{-}3\text{-}2,1\text{-}2\text{-}\mathrm{}\text{-}k)`$.

###### Corollary 2.5.

For all $`k2`$,

$$A_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)=\frac{(1+x)U_{k2}\left(\frac{1}{2x}\right)}{xU_{k1}\left(\frac{1}{2x}\right)}=(1+x)R_{k1}(x^2).$$

Corollary 2.5, for $`k=5`$, yields that the number of alternating permutations in $`A_n(1\text{-}3\text{-}2,1\text{-}2\text{-}3\text{-}4\text{-}5)`$ is given by $`F_{[(n+2)/2]}`$, where $`F_m`$ is the $`m`$th Fibonacci number.

### 2.3. A classical pattern $`\tau =2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1`$

By Proposition 2.1, we have that $`UD_{2\text{-}3\text{-}1}(x)=0`$ and $`DD_{2\text{-}3\text{-}1}(x)=x^2`$. The case of varying $`k`$ is more interesting. As an extension of this example, let us consider the case $`\tau =2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1`$.

###### Theorem 2.6.

For all $`k3`$,

1. $`UD_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)={\displaystyle \frac{xU_{k4}\left(\frac{1}{2x}\right)}{U_{k2}\left(\frac{1}{2x}\right)}}`$,
2. $`DD_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)={\displaystyle \frac{x^{k2}+U_{k4}\left(\frac{1}{2x}\right)}{U_{k2}\left(\frac{1}{2x}\right)}}`$,
3. $`UU_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)={\displaystyle \frac{U_{k3}^2\left(\frac{1}{2x}\right)}{U_{k2}^2\left(\frac{1}{2x}\right)}}`$,
4. $`DU_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)={\displaystyle \frac{x}{U_{k2}^2\left(\frac{1}{2x}\right)}}\left(x^{k3}(U_{k3}\left(\frac{1}{2x}\right)+xU_{k2}\left(\frac{1}{2x}\right))+2U_{k3}^2\left(\frac{1}{2x}\right)+U_{k4}^2\left(\frac{1}{2x}\right)2\right)`$.

###### Proof.

Proposition 2.1(1) yields

$$UD_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)=x(UD_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)+x)(UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k2)}(x)+x).$$

Using Equation 1.3 and Recurrence 1.1, together with Theorem 2.4(1), we have that case (1) holds.

Proposition 2.1(4) yields

$$DD_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)=x(x+UD_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x))(1+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k2)}x)).$$

By using the first case (1) and Theorem 2.4(1), together with Equation 1.3 and Recurrence 1.1, we get that case (2) holds.

Proposition 2.1(2) yields

$$UU_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)=x^2(1+UU_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x))+xUD_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)+xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k2)}(x)UU_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)).$$

By using cases (1) and (2), together with Theorem 2.4, Equation 1.3, and Recurrence 1.1, we have that case (3) holds.

Proposition 2.1(3) yields

$$DU_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)=xUU_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)+xDD_{1\text{-}2\text{-}\mathrm{}\text{-}(k2)}(x)UU_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)+xDD_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x).$$

By using cases (3) and (4), Theorem 2.4(2) and Recurrence 1.1, we get that case (4) holds. ∎

Theorem 2.6 yields an explicit formula to the generating function for the number of alternating permutations in $`A_n(1\text{-}3\text{-}2,2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1)`$.

###### Corollary 2.7.

For all $`k3`$,

$$A_{2\text{-}3\text{-}\mathrm{}\text{-}k\text{-}1}(x)=\frac{(1+x)U_{k3}^2\left(\frac{1}{2x}\right)x}{U_{k2}^2\left(\frac{1}{2x}\right)}.$$

For example, by using Corollary 2.7 we get that for all $`n1`$,

$$A_{2\text{-}3\text{-}4\text{-}5\text{-}6\text{-}1}(2n)=\frac{7}{10}nL_{2n}\frac{1}{10}(15n4)F_{2n}\text{ and }A_{2\text{-}3\text{-}4\text{-}5\text{-}6\text{-}1}(2n+1)=F_{2n1},$$

where $`F_m`$ is the $`m`$th Fibonacci number and $`L_m`$ is the $`m`$th Lucas number.

### 2.4. A generalized patterns $`\tau \text{-}3\text{-}\mathrm{}\text{-}k`$

In the current subsection we interesting in alternating permutations with two restrictions, the first one is $`1\text{-}3\text{-}2`$ (classical pattern $`132`$) and the second one is $`\tau \text{-}3\text{-}\mathrm{}\text{-}k`$ (generalized pattern), where $`\tau =12`$, $`\tau =21`$, $`\tau =1\text{-}2`$, or $`\tau =2\text{-}1`$. Using the same arguments as in the proof of Theorem 2.4, we get

###### Theorem 2.8.

Let $`\tau \{12,21,1\text{-}2,2\text{-}1\}`$. For all $`k2`$,

1. $`UD_{\tau \text{-}3\text{-}\mathrm{}\text{-}k}(x)={\displaystyle \frac{xU_{k3}\left(\frac{1}{2x}\right)}{U_{k1}\left(\frac{1}{2x}\right)}}`$,
2. $`DD_{\tau \text{-}3\text{-}\mathrm{}\text{-}k}(x)={\displaystyle \frac{x^{k1}+U_{k3}\left(\frac{1}{2x}\right)}{U_{k1}\left(\frac{1}{2x}\right)}}`$,
3. $`UU_{\tau \text{-}3\text{-}\mathrm{}\text{-}k}(x)={\displaystyle \frac{U_{k3}\left(\frac{1}{2x}\right)}{U_{k1}\left(\frac{1}{2x}\right)}}`$,
4. $`DU_{\tau \text{-}3\text{-}\mathrm{}\text{-}k}(x)={\displaystyle \frac{x^{k1}+U_{k3}\left(\frac{1}{2x}\right)}{xU_{k1}\left(\frac{1}{2x}\right)}}x`$.

The above theorem together with Equation 1.4 yield that the number of alternating permutations in $`A_n(1\text{-}3\text{-}2,\tau \text{-}3\text{-}\mathrm{}\text{-}k)`$, where $`\tau \{12,21,1\text{-}2,2\text{-}1\}`$.

###### Corollary 2.9.

Let $`\tau \{12,21,1\text{-}2,2\text{-}1\}`$. For any $`k2`$,

$$A_{\tau \text{-}3\text{-}\mathrm{}\text{-}k}(x)=\frac{(1+x)U_{k2}\left(\frac{1}{2x}\right)}{xU_{k1}\left(\frac{1}{2x}\right)}=(1+x)R_{k1}(x^2).$$

Corollary 2.9 suggests that there should exist a bijection between the sets $`A_n(1\text{-}3\text{-}2,1\text{-}2\text{-}\mathrm{}\text{-}k)`$ and $`A_n(1\text{-}3\text{-}2,2\text{-}1\text{-}3\text{-}\mathrm{}\text{-}k)`$. However, we failed to produce such a bijection, and finding it remains a challenging open question.

## 3. Avoiding $`1\text{-}3\text{-}2`$ and containing another pattern

In this section we consider those alternating (up-up, up-down, down-up, down-down) permutations in $`\mathrm{SS}_n`$ that avoid $`1\text{-}3\text{-}2`$ and contain another generalized pattern $`\tau `$ exactly once. We begin by setting some notation. Let $`a_{\tau ;r}(n)`$ be the number of alternating permutations in $`A_n(1\text{-}3\text{-}2)`$ that contain $`\tau `$ exactly $`r`$ times. Moreover, we denote the number of up-up (resp. up-down, down-up, down-down) permutations in $`\mathrm{SS}_n(1\text{-}3\text{-}2)`$ that contain $`\tau `$ exactly $`r`$ times by $`uu_{\tau ;r}(n)`$ (resp. $`ud_{\tau ;r}(n)`$, $`du_{\tau ;r}(n)`$, $`dd_{\tau ;r}(n)`$). We denote the corresponding generating function by $`A_{\tau ;r}(x)`$ (resp. $`UU_{\tau ;r}(x)`$, $`UD_{\tau ;r}(x)`$, $`DU_{\tau ;r}(x)`$, $`DD_{\tau ;r}(x)`$). In this section we use out Proposition 2.1 and generating function techniques to enumerate $`a_{\tau ;r}(n)`$, $`ud_{\tau ;r}(n)`$, $`uu_{\tau ;r}(x)`$, $`du_{\tau ;r}(n)`$, and $`dd_{\tau ;r}(n)`$ for various cases of $`\tau `$.

### 3.1. A classical pattern $`\tau =1\text{-}2\text{-}\mathrm{}\text{-}k`$

###### Theorem 3.1.

For all $`k2`$,

1. $`UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)={\displaystyle \frac{x}{U_{k1}^2\left(\frac{1}{2x}\right)}}`$;
2. $`DD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)={\displaystyle \frac{1}{U_{k1}\left(\frac{1}{2x}\right)}}\underset{m=0}{\overset{k2}{}}{\displaystyle \frac{x^{k1m}(x^{m+1}+U_{m1}\left(\frac{1}{2x}\right))}{U_m\left(\frac{1}{2x}\right)U_{m+1}\left(\frac{1}{2x}\right)}}`$;
3. $`UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)={\displaystyle \frac{1}{U_{k1}^2\left(\frac{1}{2x}\right)}}`$;
4. $`DU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)={\displaystyle \frac{1}{xU_{k1}\left(\frac{1}{2x}\right)}}\underset{m=0}{\overset{k2}{}}{\displaystyle \frac{x^{k1m}(x^{m+1}+U_{m1}\left(\frac{1}{2x}\right))}{U_m\left(\frac{1}{2x}\right)U_{m+1}\left(\frac{1}{2x}\right)}}`$.

###### Proof.

To verify (1), as consequence of Proposition 2.1, we have three possibilities for the block decomposition for an arbitrary up-down permutation $`\pi =(\alpha ,n,\beta )UD_n(1\text{-}3\text{-}2)`$ that contain $`1\text{-}2\text{-}\mathrm{}\text{-}k`$ exactly once. The first possibility is $`\alpha =(n1)`$ and $`\beta UD_{n2}(1\text{-}3\text{-}2)`$ contains $`1\text{-}2\text{-}\mathrm{}\text{-}k`$ exactly once. The second possibility is $`\beta =(1)`$ and $`\alpha `$ is up-down permutation of the numbers $`2,3,\mathrm{},n1`$ which contains $`1\text{-}2\text{-}\mathrm{}\text{-}(k1)`$ exactly once. The third possibility satisfies the condition that every entry of $`\alpha `$ is greater than every entry of $`\beta `$, where $`\alpha `$ and $`\beta `$ are up-down permutations on the numbers $`nj+1,nj+2,\mathrm{},n1`$ and $`1,2,\mathrm{},nj`$ (respectively) such that either $`\alpha `$ contains $`1\text{-}2\text{-}\mathrm{}\text{-}(k1)`$ exactly once and $`\beta `$ avoids $`1\text{-}2\text{-}\mathrm{}\text{-}k`$, or $`\alpha `$ avoids $`1\text{-}2\text{-}\mathrm{}\text{-}(k1)`$ and $`\beta `$ contains $`1\text{-}2\text{-}\mathrm{}\text{-}k`$ exactly once. So, the first, the second, and the third cases above give contribution $`x^2UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)`$, $`x^2UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)`$, $`xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;0}(x)+xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);0}(x)UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)`$, respectively. Therefore,

$$\begin{array}{c}UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)=x^2UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)+x^2UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)+\hfill \\ +xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;0}(x)+xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);0}(x)UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x).\hfill \end{array}$$

Using Theorem 2.4 together with Equation 1.3 and Recurrence 1.1, we get

$$UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)=xR_{k1}^2(x^2)UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x).$$

Besides, by definitions we have that $`UD_{1\text{-}2;1}(x)=x^2`$. Hence, by Identity 1.2 and by induction, case (1) holds.

Let us verify (2). Using the same arguments as in the proof of (1), we get

$$\begin{array}{c}DD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)=xUD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)+xDD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;0}(x)+\hfill \\ +xDD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);0}(x)UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)+x^2DD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x),\hfill \end{array}$$

together with $`DD_{1\text{-}2;1}(x)=x^4`$ (by the definitions). Hence, by using (1), Theorem 2.4 and induction on $`k`$, we get the desired result as claimed in (2).

Let us verify (3). Using the same arguments as in the proof of (1), we get

$$\begin{array}{c}UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)=x^2UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)+xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)+\hfill \\ +xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);0}(x)UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)+xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;0}(x),\hfill \end{array}$$

equivalently,

$$UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)=\frac{xUU_{1\text{-}2\text{-}\mathrm{}\text{-}k;0}(x)UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)}{1x^2xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);0}(x)}.$$

Hence, by using (1), Equation 1.3 and Recurrence 1.1, case (3) holds.

Similarly to the cases above, case (4) holds. ∎

As a corollary to Theorem 3.1 and Equation 1.4, we get the number of alternating permutations in $`\mathrm{SS}_n(1\text{-}3\text{-}2)`$ that contain $`1\text{-}2\text{-}\mathrm{}\text{-}k`$ exactly once.

###### Corollary 3.2.

For all $`k3`$,

$$A_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)=\frac{1+x}{U_{k1}^2\left(\frac{1}{2x}\right)}.$$

For example, the number of alternating permutations in $`A_n(1\text{-}3\text{-}2)`$ that contain $`1\text{-}2\text{-}3\text{-}4\text{-}5`$ exactly once is given by $`_{j=1}^{[n/2]3}F_{2j}F_{2[n/2]42j}`$ for all $`n6`$, where $`F_m`$ is the $`m`$th Fibonacci number.

### 3.2. A generalized patterns $`\tau \text{-}3\text{-}\mathrm{}\text{-}k`$

In the current subsection we interesting in alternating permutations with two restrictions, the first one is $`1\text{-}3\text{-}2`$ (classical pattern $`132`$) and the second one is $`\tau \text{-}3\text{-}\mathrm{}\text{-}k`$ (generalized pattern), where $`\tau =12`$, $`\tau =21`$, $`\tau =1\text{-}2`$, or $`\tau =2\text{-}1`$. Using the same arguments as in the proof of Theorem 3.1, we get

###### Theorem 3.3.

Let $`\tau \{12,21,1\text{-}2\}`$. For all $`k3`$,

1. $`UD_{\tau \text{-}3\text{-}\mathrm{}\text{-}k;1}(x)=\frac{x}{U_{k1}^2\left(\frac{1}{2x}\right)}`$;
2. $`UU_{\tau \text{-}3\text{-}\mathrm{}\text{-}k;1}(x)=\frac{1}{U_{k1}^2\left(\frac{1}{2x}\right)}`$,
3. $`UD_{2\text{-}1\text{-}3\mathrm{}\text{-}k;1}(x)=UU_{2\text{-}1\text{-}3\mathrm{}\text{-}k;1}(x)=0`$.

As a corollary to Theorem 3.3 and Equation 1.4 we get the number of alternating permutations in $`A_n(1\text{-}3\text{-}2)`$ that contain $`\tau \text{-}3\text{-}\mathrm{}\text{-}k`$ exactly once, where $`\tau \{12,21,1\text{-}2,2\text{-}1\}`$.

###### Corollary 3.4.

Let $`\tau \{12,21,1\text{-}2\}`$. For $`k3`$,

$$A_{\tau \text{-}3\text{-}\mathrm{}\text{-}k;1}(x)=\frac{(1+x)U_{k2}\left(\frac{1}{2x}\right)}{xU_{k1}\left(\frac{1}{2x}\right)}=(1+x)R_{k1}(x^2).$$

Besides, $`A_{2\text{-}1\text{-}3\text{-}\mathrm{}\text{-}k;1}(x)=0`$ for all $`k3`$.

Corollary 3.4 suggests that there should exist a bijection between the sets of alternating permutations of length $`n`$ that avoid $`1\text{-}3\text{-}2`$ and contain $`1\text{-}2\text{-}\mathrm{}\text{-}k`$ exactly once and the set of alternating permutations of length $`n`$ that avoid $`1\text{-}3\text{-}2`$ and contain $`2\text{-}1\text{-}3\text{-}\mathrm{}\text{-}k`$ exactly once. However, we failed to produce such a bijection, and finding it remains a challenging open question.

Again, by the same arguments as in the proof of Theorem 3.1, with using Proposition 2.1, we get the following result.

###### Theorem 3.5.

For all $`k3`$,

1. $`DD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)=\frac{x}{U_{k1}\left(\frac{1}{2x}\right)}_{j=0}^{k2}\frac{x^{k2j}(x^{j+1}+U_{j1}\left(\frac{1}{2x}\right))}{U_j\left(\frac{1}{2x}\right)U_{j+1}\left(\frac{1}{2x}\right)}`$,
2. $`DD_{12\text{-}3\text{-}4\text{-}\mathrm{}\text{-}k;1}(x)=\frac{x}{U_{k1}\left(\frac{1}{2x}\right)}\left(x^k+_{j=0}^{k2}\frac{x^{k2j}(x^{j+1}+U_{j1}\left(\frac{1}{2x}\right))}{U_j\left(\frac{1}{2x}\right)U_{j+1}\left(\frac{1}{2x}\right)}\right)`$,
3. $`DD_{2\text{-}1\text{-}3\text{-}4\text{-}\mathrm{}\text{-}k;1}(x)=\frac{x^{k1}}{U_{k1}\left(\frac{1}{2x}\right)}`$,
4. $`DD_{21\text{-}3\text{-}4\text{-}\mathrm{}\text{-}k;1}(x)=\frac{1}{U_{k1}^2\left(\frac{1}{2x}\right)}`$.

Moreover, for all $`k3`$,

$$DU_{\tau \text{-}3\text{-}4\text{-}\mathrm{}\text{-}k;1}(x)=\frac{1}{x}DD_{\tau \text{-}3\text{-}4\text{-}\mathrm{}\text{-}k;1}(x),$$

where $`\tau \{12,21,1\text{-}2,2\text{-}1\}`$.

### 3.3. A three letter generalized pattern without dashes

In this subsection we find an explicit expression for $`UD_{\tau ;r}(x)`$, $`UU_{\tau ;r}(x)`$, $`DU_{\tau ;r}(x)`$, $`DD_{\tau ;r}(x)`$, and $`A_{\tau ;r}(x)`$, where $`\tau =123`$, $`213`$, $`231`$, $`312`$, $`321`$ are generalized pattern without dashes.

###### Theorem 3.6.

For all $`r0`$,

1. $`UD_{123;r}(x)=UD_{321}(x;r)=0`$,
2. $`UD_{213;r}(x)=_{nr+1}\frac{(r+1)}{n(nr)}\left(\genfrac{}{}{0pt}{}{n}{r+1}\right)^2x^{2n+1}`$,
3. $`UD_{231;r}(x)=\frac{1}{r+1}\left(\genfrac{}{}{0pt}{}{2r}{r}\right)x^{2r+1}`$ for $`r1`$,
4. $`UD_{312;r}(x)=_{nr+1}\frac{(r+1)}{n(nr)}\left(\genfrac{}{}{0pt}{}{n}{r+1}\right)^2x^{2n+1}`$.

###### Proof.

First of all, let us define $`UD_\tau (x,q)=_{r0}UD_{\tau ;r}(x)q^r`$ (similarly, we define $`UU_\tau (x,q)`$, $`DU_\tau (x,q)`$, and $`DD_\tau (x,q)`$).

The first case (1) holds by the definitions. To verify (2), let us use the same arguments as in the proof of Theorem 2.4. So, we have

$$UD_{213}(x,q)=x^2(x+UD_{213}(x,q))+xqUD_{213}(x,q)(x+UD_{213}(x,q)),$$

equivalently,

$$UD_{213}(x,q)=\frac{1x^2(1+q)\sqrt{x^4(1q)^22x^2(q+1)+1}}{2xq}.$$

The rest is easy to check.

Similarly, we have that

$$UD_{231}(x,q)=x^2q(x+UD_{231}(x,q))+xqUD_{231}(x,q)(x+UD_{231}(x)),$$

equivalently,

$$UD_{231}(x,q)=\frac{x^3q}{12x^2qxqUD_{231}(x,q)}.$$

The rest is easy to check.

Finally, by the reversal symmetric operation (defined by $`(\pi _1,\mathrm{},\pi _n)(\pi _n,\mathrm{},\pi _1)`$) we get that $`UD_{213}(x;r)=UD_{312}(x;r)`$ for all $`r0`$. ∎

Similarly to Theorem 3.6 we get the following result.

###### Theorem 3.7.

Let $`r0`$.

1. $`UU_{123}(x;r)=UU_{321}(x;r)=0`$;
2. $`UU_{213}(x;r)=_{nr+1}\frac{(r+1)}{n(nr)}\left(\genfrac{}{}{0pt}{}{n}{r+1}\right)^2x^{2n}`$;
3. $`UD_{231}(x;r)=\frac{1}{r+1}\left(\genfrac{}{}{0pt}{}{2r}{r}\right)x^{2r+2}`$ for $`r1`$;
4. $`UU_{312}(x;r)=_{nr+1}\frac{(r+1)}{n(nr)}\left(\genfrac{}{}{0pt}{}{n}{r+1}\right)^2x^{2n}`$.

As a corollary to Theorem 3.6 and Theorem 3.7, we have the following result.

###### Theorem 3.8.

Let $`r0`$.

1. $`A_{123}(x;r)=A_{321}(x;r)=0`$;
2. $`A_{213}(x;r)=A_{312}(x;r)=_{nr+1}\frac{(r+1)}{n(nr)}\left(\genfrac{}{}{0pt}{}{n}{r+1}\right)^2(x^{2n}+x^{2n+1})`$;
3. $`A_{231}(x;r)=C_r(x^{2r+2}+x^{2r+1})`$ for $`r1`$.

## 4. Containing $`1\text{-}3\text{-}2`$ exactly once and avoiding arbitrary pattern

In this section we consider those alternating (up-up, up-down, down-up, down-down) permutations in $`\mathrm{SS}_n`$ that contain $`1\text{-}3\text{-}2`$ exactly once and avoid an arbitrary generalized pattern $`\tau `$. We begin by setting some notation. Let $`A_\tau ^1(x)`$ be the generating function for the number of alternating permutations in $`A_n(\tau )`$ that contain $`1\text{-}3\text{-}2`$ exactly once. More precisely, We denote the generating function for number of up-up (resp. up-down, down-up, down-down) permutations in $`\mathrm{SS}_n(\tau )`$ that contain $`1\text{-}3\text{-}2`$ exactly once by $`UD_\tau ^1(x)`$ (resp. $`UU_\tau ^1(x)`$, $`DU_\tau ^1(x)`$, $`DD_\tau ^1(x)`$). In this section we describe a method for enumerating alternating (up-up, up-down, down-up, down-down) permutations that contain $`1\text{-}3\text{-}2`$ exactly once and avoid another generalized pattern. We begin with observation concerning the structure of the permutations that contain $`1\text{-}3\text{-}2`$ exactly once.

Using the block decomposition approach (see \[MV4\]) we get two possibilities for the block decomposition for permutation $`\pi `$ containing $`1\text{-}3\text{-}2`$ exactly once. The first one is $`\alpha =(\alpha ^{},n,\alpha ^{\prime \prime })`$, where every entry of $`\alpha ^{}`$ is greater than every entry of $`\alpha ^{\prime \prime }`$, and the second one is $`\alpha =(\alpha ^{},nt+1,n,\alpha ^{\prime \prime },nt+2,\alpha ^{\prime \prime \prime })`$, where every entry of $`\alpha ^{}`$ is greater than $`nt+2`$, $`nt+1`$ is greater than every entry of $`\alpha ^{\prime \prime }`$, and every entry of $`\alpha ^{\prime \prime }`$ is greater than every entry of $`\alpha ^{\prime \prime \prime }`$, as described in Figures 1 and 2. Therefore, by using the block decomposition of $`\alpha `$, we get the following proposition which is the base for all the results in this section.

###### Proposition 4.1.

Let $`\alpha \mathrm{SS}_n`$ contains $`1\text{-}3\text{-}2`$ exactly once. Then the block decomposition of $`\alpha `$ can have one of the following three forms:

(i) there exists $`t`$ such that $`\alpha =(\alpha ^{},n,\alpha ^{\prime \prime })`$, where $`\alpha ^{}`$ is a permutation of $`n1,n2,\mathrm{},nt+1`$ which contains $`1\text{-}3\text{-}2`$ exactly once, and $`\alpha ^{\prime \prime }`$ is a permutation of $`1,2,\mathrm{},nt`$ which avoids $`1\text{-}3\text{-}2`$;

(ii) there exists $`t`$ such that $`\alpha =(\alpha ^{},n,\alpha ^{\prime \prime })`$, where $`\alpha ^{}`$ is a permutation of $`n1,n2,\mathrm{},nt+1`$ which avoids $`1\text{-}3\text{-}2`$, and $`\alpha ^{\prime \prime }`$ is a permutation of $`1,2,\mathrm{},nt`$ which contains $`1\text{-}3\text{-}2`$ exactly once;

(iii) there exist $`t,u`$ such that $`\alpha =(\alpha ^{},nt+1,n,\alpha ^{\prime \prime },nt+2,\alpha ^{\prime \prime \prime })`$, where $`\alpha ^{}`$ is a permutation of $`n1,n2,\mathrm{},nt+3`$ which avoids $`1\text{-}3\text{-}2`$, $`\alpha ^{\prime \prime }`$ is a permutation of $`nt,nt1,\mathrm{},nu+1`$ which avoids $`1\text{-}3\text{-}2`$, and $`\alpha ^{\prime \prime \prime }`$ is a permutation of $`1,2,\mathrm{},nu`$ which avoids $`1\text{-}3\text{-}2`$.

As a remark, using the proposition above for an arbitrary permutation $`\alpha `$ which contains $`1\text{-}3\text{-}2`$ exactly once together with the definitions of up-up, up-down, down-up, down-down permutations we can present all the possibilities of the block decomposition for any arbitrary up-up, up-down, down-up, down-down permutation, respectively.

### 4.1. The pattern $`\tau =\mathrm{}`$

Using Proposition 4.1, we now enumerate those alternating (up-up, up-down, down-up, down-down) permutations in $`\mathrm{SS}_n`$ that contain $`1\text{-}3\text{-}2`$ exactly once.

###### Theorem 4.2.

We have

1. The generating function for the number of up-down permutations in $`\mathrm{SS}_n`$ containing $`1\text{-}3\text{-}2`$ exactly once is given by

$$UD_{\mathrm{}}^1(x)=\frac{x(1\sqrt{14x^2})}{14x^2+\sqrt{14x^2}}.$$

In other words, the number of up-down permutations in $`\mathrm{SS}_n`$ containing $`1\text{-}3\text{-}2`$ exactly once is given by $`\left(\genfrac{}{}{0pt}{}{n1}{(n3)/2}\right)`$,
2. The generating function for the number of up-up permutations in $`\mathrm{SS}_n`$ containing $`1\text{-}3\text{-}2`$ exactly once is given by

$$UU_{\mathrm{}}^1(x)=\frac{x^21}{x^2}+\frac{13x^2}{x^2\sqrt{14x^2}}.$$

In other words, the number of up-up permutations in $`\mathrm{SS}_n`$ containing $`1\text{-}3\text{-}2`$ exactly once is given by $`2\left(\genfrac{}{}{0pt}{}{n1}{(n4)/2}\right)`$,
3. The generating function for the number of down-down permutations in $`\mathrm{SS}_n`$ containing $`1\text{-}3\text{-}2`$ exactly once is given by

$$DD_{\mathrm{}}^1(x)=\frac{x^21}{x^2}+\frac{13x^2}{x^2\sqrt{14x^2}}.$$

In other words, the number of down-down permutations in $`\mathrm{SS}_n`$ containing $`1\text{-}3\text{-}2`$ exactly once is given by $`2\left(\genfrac{}{}{0pt}{}{n1}{(n4)/2}\right)`$,
4. The generating function for the number of down-up permutations in $`\mathrm{SS}_n`$ containing $`1\text{-}3\text{-}2`$ exactly once is given by

$$DU_{\mathrm{}}^1(x)=\frac{2x^4+4x^23}{2x^3}+\frac{310x^2}{2x^3\sqrt{14x^2}}.$$

In other words, the number of down-up permutations in $`\mathrm{SS}_n`$ containing $`1\text{-}3\text{-}2`$ exactly once is given by $`\frac{3}{2}\left(\genfrac{}{}{0pt}{}{n+3}{(n+3)/2}\right)5\left(\genfrac{}{}{0pt}{}{n+1}{(n+1)/2}\right)`$,

where $`\left(\genfrac{}{}{0pt}{}{a}{b}\right)`$ is assumed to be $`0`$ whenever $`a<b`$, $`b<0`$, or $`b`$ is a non-integer number.

###### Proof.

To verify (1), let us consider the three possibilities of the block decompositions, as described in Proposition 4.1, for an arbitrary permutation $`\pi \mathrm{SS}_n`$ that contain $`1\text{-}3\text{-}2`$ exactly. The first (or the second) contribution of the block decomposition above for up-down permutations gives

$$xUD_{\mathrm{}}^1(x)(x+UD_{\mathrm{}}(x)),$$

and the third contribution of the block decomposition above for up-down permutations gives

$$x^3\left(UU_{\mathrm{}}(x)(x+UD_{\mathrm{}}(x))^2+(x+UD_{\mathrm{}}(x))^2+UU_{\mathrm{}}(x)+1\right).$$

Therefore, by using the above three contributions, we have

$$\begin{array}{c}UD_{\mathrm{}}^1(x)=2xUD_{\mathrm{}}^1(x)(x+UD_{\mathrm{}}(x))+x^3\left(UU_{\mathrm{}}(x)(x+UD_{\mathrm{}}(x))^2+(x+UD(x))^2+UU_{\mathrm{}}(x)+1\right).\hfill \end{array}$$

Hence, by solving the above equation together with Theorem 2.2, we get the claimed in (1).

Similarly, let us verify (2). The first contribution of the block decomposition for up-up permutations gives $`xUD_{\mathrm{}}^1(x)(UU_{\mathrm{}}(x)+1)`$, the second contribution of the block decomposition for up-up permutations gives $`x(UD_{\mathrm{}}(x)+x)UU_{\mathrm{}}^1(x)`$, and the third contribution of the block decomposition for up-up permutations gives $`x^3(UU_{\mathrm{}}(x)+1)^2(UD_{\mathrm{}}(x)+x)`$. Therefore, by using the three three contributions above, we get

$$UU_{\mathrm{}}^1(x)=xUD_{\mathrm{}}^1(x)(UU_{\mathrm{}}(x)+1)+x(UD_{\mathrm{}}(x)+x)UU_{\mathrm{}}^1(x)+x^3(UU_{\mathrm{}}(x)+1)^2(UD_{\mathrm{}}(x)+x).$$

Hence, by using (1) together with Theorem 2.2 we get the claimed in (2).

Similarly to (1) and (2), we can verify cases (3) and (4). ∎

As a corollary to Theorem 4.2 together with Identity 1.4 we have

###### Corollary 4.3.

The number of alternating permutations in $`A_n`$ containing $`1\text{-}3\text{-}2`$ exactly once is given by

$$\left(\genfrac{}{}{0pt}{}{n1}{(n3)/2}\right)+\left(\genfrac{}{}{0pt}{}{n1}{(n4)/2}\right),$$

where $`\left(\genfrac{}{}{0pt}{}{a}{b}\right)`$ is assumed to be $`0`$ whenever $`a<b`$, $`b<0`$, or $`b`$ is a non-integer number.

Using Proposition 4.1 for alternating permutations, we now enumerate various sets of alternating (up-up, up-down, down-up, down-down) permutations in $`\mathrm{SS}_n`$ that contain $`1\text{-}3\text{-}2`$ exactly once and avoid nonempty generalized pattern $`\tau `$.

### 4.2. A classical pattern $`\tau =1\text{-}2\text{-}\mathrm{}\text{-}k`$

###### Theorem 4.4.

For all $`k3`$,

1. $`UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)={\displaystyle \frac{1}{U_{k1}^2\left(\frac{1}{2x}\right)}}\underset{j=0}{\overset{k3}{}}U_{j+1}\left(\frac{1}{2x}\right)U_j\left(\frac{1}{2x}\right)`$;
2. $`UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)={\displaystyle \frac{1}{xU_{k1}^2\left(\frac{1}{2x}\right)}}\left(xU_{k3}^2\left(\frac{1}{2x}\right)+\underset{j=0}{\overset{k4}{}}U_j\left(\frac{1}{2x}\right)U_{j+1}\left(\frac{1}{2x}\right)\right)`$;
3. The generating function $`DD_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)`$ is given by

$$\frac{1}{U_{k1}\left(\frac{1}{2x}\right)}\underset{i=0}{\overset{k2}{}}x^i\left[\frac{x^{k1i}+U_{k3i}\left(\frac{1}{2x}\right)}{U_{k1i}\left(\frac{1}{2x}\right)U_{k2i}\left(\frac{1}{2x}\right)}\left(\underset{j=0}{\overset{k2i}{}}U_j\left(\frac{1}{2x}\right)U_{j+1}\left(\frac{1}{2x}\right)\right)xU_{k2i}\left(\frac{1}{2x}\right)\right];$$
4. The generating function $`DU_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)`$ is given by

$$\frac{x^{k1}+U_{k3}\left(\frac{1}{2x}\right)}{U_{k2}\left(\frac{1}{2x}\right)}UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)+\frac{U_{k2}\left(\frac{1}{2x}\right)}{U_{k1}\left(\frac{1}{2x}\right)}DD_{k1}^1(x)+\frac{xU_{k3}\left(\frac{1}{2x}\right)(x^{k2}+U_{k4}\left(\frac{1}{2x}\right))}{U_{k2}\left(\frac{1}{2x}\right)U_{k1}\left(\frac{1}{2x}\right)}.$$

###### Proof.

Using the same arguments as in the proof of Theorem 4.2, we get the following. The first contribution of the block decomposition for up-down permutations gives

$$x^2UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)+xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}^1(x)(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)),$$

the second contribution of the block decomposition for up-down permutations gives

$$xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x)UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x),$$

and the third contribution of the block decomposition for up-down permutations gives

$$x^3(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))\left((x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x))+1\right).$$

Therefore, by using the three contributions above together with Theorem 2.4 and Recurrence 1.1, we have

$$UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)=\frac{U_{k2}\left(\frac{1}{2x}\right)U_{k3}\left(\frac{1}{2x}\right)}{U_{k1}^2\left(\frac{1}{2x}\right)}+\frac{U_{k2}^2\left(\frac{1}{2x}\right)}{U_{k3}^2\left(\frac{1}{2x}\right)}UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}^1(x).$$

Hence, by induction on $`k`$ together with $`UD_{1\text{-}2}^1(x)=0`$ (by the definitions) we get the desired result as claimed in (1).

Similarly, let us verify (2). The first contribution of the block decomposition for up-up permutations gives

$$x^2UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)+xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}^1(x)(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)),$$

the second contribution of the block decomposition for up-up permutations gives

$$xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x)UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x),$$

and the third contribution of the block decomposition for up-up permutations gives

$$x^3(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x))..$$

Therefore, by using the three contributions above together with case (1), Theorem 2.4 and Recurrence 1.1, we get the desired result as claimed in (2).

Similarly, we have

$$\begin{array}{c}DD_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)=x(1+DD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)+x(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x))DD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}^1(x)\hfill \\ +x^3(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))(1+(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x))),\hfill \\ \\ DU_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)=x(1+DD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)+x(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x))DD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}^1(x)\hfill \\ +x^3(x+DU_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x)).\hfill \end{array}$$

Using Theorem 2.4, cases (1) and (2), and Recurrence 1.1, we get (3). ∎

As a corollary to Theorem 4.4 together with using Identity 1.4, we have

###### Corollary 4.5.

For all $`k3`$, the generating function $`A_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)`$ given by

$$\frac{1}{xU_{k1}^2\left(\frac{1}{2x}\right)}\left[xU_{k3}\left(\frac{1}{2x}\right)\left(U_{k3}\left(\frac{1}{2x}\right)+U_{k4}\left(\frac{1}{2x}\right)\right)+(1+x)\underset{m=0}{\overset{k4}{}}U_{m+1}\left(\frac{1}{2x}\right)U_m\left(\frac{1}{2x}\right)\right].$$

### 4.3. A generalized patterns $`\tau =12\text{-}3\text{-}\mathrm{}\text{-}k`$ or $`\tau =21\text{-}3\text{-}\mathrm{}\text{-}k`$

Using the same arguments as in the proof of Theorem 4.4, we get

###### Theorem 4.6.

For all $`k3`$,

$$\begin{array}{ccc}& UD_{12\text{-}3\text{-}\mathrm{}\text{-}k}^1(x)=UD_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x),\hfill & UU_{12\text{-}3\text{-}\mathrm{}\text{-}k}^1(x)=UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)\hfill \\ & DU_{12\text{-}3\text{-}\mathrm{}\text{-}k}^1(x)=DU_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x),\hfill & DD_{12\text{-}3\text{-}\mathrm{}\text{-}k}^1(x)=DD_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x).\hfill \end{array}$$

Moreover, for all $`k3`$,

$$A_{\tau \text{-}3\text{-}\mathrm{}\text{-}k}^1(x)=A_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x).$$

### 4.4. A classical pattern $`\tau =2\text{-}1\text{-}3\text{-}\mathrm{}\text{-}k`$

Using the same arguments as in the proof of Theorem 4.4, we get

###### Theorem 4.7.

For all $`k3`$,

1. $`UD_{2\text{-}1\text{-}3\text{-}\mathrm{}\text{-}k}^1(x)={\displaystyle \frac{1}{U_{k1}^2\left(\frac{1}{2x}\right)}}\left(\underset{j=0}{\overset{k3}{}}U_{j+1}\left(\frac{1}{2x}\right)U_j\left(\frac{1}{2x}\right)x\right)`$;
2. $`UU_{2\text{-}1\text{-}3\text{-}\mathrm{}\text{-}k}^1(x)={\displaystyle \frac{1}{xU_{k1}^2\left(\frac{1}{2x}\right)}}\left(xU_{k4}\left(\frac{1}{2x}\right)U_{k2}\left(\frac{1}{2x}\right)+\underset{j=0}{\overset{k4}{}}U_j\left(\frac{1}{2x}\right)U_{j+1}\right)`$.

## 5. Containing $`1\text{-}3\text{-}2`$ exactly once and another arbitrary pattern

In this section we consider those alternating (up-up, up-down, down-up, down-down) permutations in $`\mathrm{SS}_n`$ that contain $`1\text{-}3\text{-}2`$ exactly once and contain an arbitrary generalized pattern $`\tau `$. We begin by setting some notation. Let $`A_{\tau ;r}^1(x)`$ be the generating function for the number of alternating permutations in $`A_n`$ that contain $`1\text{-}3\text{-}2`$ exactly once and contain $`\tau `$ exactly $`r`$ times. Moreover, We denote the generating function for number of up-up (resp. up-down, down-up, down-down) permutations in $`\mathrm{SS}_n`$ that contain $`1\text{-}3\text{-}2`$ exactly once and contain $`\tau `$ exactly $`r`$ times by $`UD_{\tau ;r}^1(x)`$ (resp. $`UU_{\tau ;r}^1(x)`$, $`DU_{\tau ;r}^1(x)`$, $`DD_{\tau ;r}^1(x)`$).

One can try to obtain results similar to Theorems 2.4, 3.1, and 4.2, but expressions involved become extremely cumbersome. So we just present the case of the up-down permutations in $`\mathrm{SS}_n`$ that contain $`1\text{-}3\text{-}2`$ exactly once and contain $`1\text{-}2\text{-}\mathrm{}\text{-}k`$ exactly once. Using Proposition 4.1 together with Theorems 2.4, 3.1, and 4.4, we get the following result.

###### Theorem 5.1.

Let $`k2`$, the generating function $`UD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}^1(x)`$ is given by

$$\frac{1}{U_{k1}^2\left(\frac{1}{2x}\right)}.\underset{j=0}{\overset{k3}{}}\left[\frac{U_{j+1}\left(\frac{1}{2x}\right)\left(U_{j+1}\left(\frac{1}{2x}\right)+xU_j\left(\frac{1}{2x}\right)\right)+2x_{i=0}^{j1}U_i\left(\frac{1}{2x}\right)U_{i+1}\left(\frac{1}{2x}\right)}{U_{j+1}\left(\frac{1}{2x}\right)U_{j+2}\left(\frac{1}{2x}\right)}\right].$$

As a remark, the generating functions $`UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}^1(x)`$, $`DU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}^1(x)`$, and $`DD_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}^1(x)`$ have more complicated expressions since the equations, which these generating function satisfied to, expressed in terms of $`UD_{1\text{-}2\text{-}\mathrm{}\text{-}d;1}^1(x)`$. For example, $`UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}^1(x)`$ satisfies

$$\begin{array}{c}UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}^1(x)=xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}^1(x)(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x))+xUD_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x)+\hfill \\ +xUD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}^1(x)+x(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}^1(x)+\hfill \\ +x^3UU_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x))+\hfill \\ +x^3(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1);1}(x)(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}k}(x))+\hfill \\ +x^3(1+UU_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))(x+UD_{1\text{-}2\text{-}\mathrm{}\text{-}(k1)}(x))UU_{1\text{-}2\text{-}\mathrm{}\text{-}k;1}(x).\hfill \end{array}$$

## 6. Further results

Here we present two directions to generalize and to extend the results of the previous subsections.

### 6.1. Statistics on alternating permutation that avoid $`1\text{-}3\text{-}2`$

The first direction is to find a statistics on alternating permutations in $`A_n`$ that avoid $`1\text{-}3\text{-}2`$.

#### 6.1.1. A classical pattern $`1\text{-}2\text{-}\mathrm{}\text{-}k`$

We define

$$\begin{array}{c}UD_1(x_1,x_2,\mathrm{})=\underset{n0}{}\underset{\pi UD_n(1\text{-}3\text{-}2)}{}_{j1}x_j^{1\text{-}2\text{-}\mathrm{}\text{-}j(\pi )},\hfill \\ DU_1(x_1,x_2,\mathrm{})=\underset{n0}{}\underset{\pi DU_n(1\text{-}3\text{-}2)}{}_{j1}x_j^{1\text{-}2\text{-}\mathrm{}\text{-}j(\pi )},\hfill \\ UU_1(x_1,x_2,\mathrm{})=\underset{n0}{}\underset{\pi UU_n(1\text{-}3\text{-}2)}{}_{j1}x_j^{1\text{-}2\text{-}\mathrm{}\text{-}j(\pi )},\hfill \\ DD_1(x_1,x_2,\mathrm{})=\underset{n0}{}\underset{\pi DD_n(1\text{-}3\text{-}2)}{}_{j1}x_j^{1\text{-}2\text{-}\mathrm{}\text{-}j(\pi )},\hfill \end{array}$$

where $`1\text{-}2\text{-}\mathrm{}\text{-}j(\pi )`$ is the number of occurrences of $`1\text{-}2\text{-}\mathrm{}\text{-}j`$ in $`\pi `$.

###### Theorem 6.1.

We have

* The generating function $`UD_1(x_1,x_2,\mathrm{})`$ is given by

$$\frac{_{j1}x_j^{2\left(\genfrac{}{}{0pt}{}{0}{j1}\right)}}{_{j1}x_j^{\left(\genfrac{}{}{0pt}{}{0}{j1}\right)}{\displaystyle \frac{1}{_{j1}x_j^{\left(\genfrac{}{}{0pt}{}{0}{j1}\right)}{\displaystyle \frac{_{j1}x_j^{2\left(\genfrac{}{}{0pt}{}{1}{j1}\right)}}{_{j1}x_j^{\left(\genfrac{}{}{0pt}{}{1}{j1}\right)}{\displaystyle \frac{1}{_{j1}x_j^{\left(\genfrac{}{}{0pt}{}{1}{j1}\right)}{\displaystyle \frac{_{j1}x_j^{2\left(\genfrac{}{}{0pt}{}{2}{j1}\right)}}{\mathrm{}}}}}}}}}}$$
* The generating function $`UU_1(x_1,x_2,\mathrm{})`$ is given by

$$\frac{1}{1{\displaystyle \frac{1}{x_1^2+x_1UD_1(x_1x_2,x_2x_3,\mathrm{})}}}.$$
* The generating function $`DD_1(x_1,x_2,\mathrm{})`$ is given by

$$\underset{n1}{}\underset{d=1}{\overset{n}{}}\frac{_{j1}x_j^{2\left(\genfrac{}{}{0pt}{}{d1}{j1}\right)}}{1_{j1}x_j^{2\left(\genfrac{}{}{0pt}{}{d1}{j1}\right)}_{j1}x_j^{\left(\genfrac{}{}{0pt}{}{d1}{j1}\right)}UD_1(_{j1}x_j^{\left(\genfrac{}{}{0pt}{}{d}{j}\right)},_{j1}x_{j+1}^{\left(\genfrac{}{}{0pt}{}{d}{j}\right)},\mathrm{})}.$$
* The generating function $`DU_1(x_1,x_2,\mathrm{})`$ is given by

$$x_1UU_1(x_1,x_2,\mathrm{})+x_1DD_1(x_1x_2,x_2x_3,\mathrm{})(1+UU_1(x_1,x_2,\mathrm{})).$$

###### Proof.

Proposition 2.1(1) yields

$$UD_1(x_1,x_2,\mathrm{})=x_1(UD_1(x_1x_2,x_2x_3,\mathrm{})+x_1)(UD_1(x_1,x_2,\mathrm{})+x_1),$$

equivalently,

$$UD_1(x_1,x_2,\mathrm{})=\frac{x_1^2}{x_1{\displaystyle \frac{1}{x_1+UD_1(x_1x_2,x_2x_3,\mathrm{})}}}.$$

Hence, by induction, we get (i).

Proposition 2.1(3) yields

$$UU_1(x_1,x_2,\mathrm{})=x_1(x_1+UD_1(x_1x_2,\mathrm{}))(1+UU_1(x_1,x_2,\mathrm{})),$$

which equivalently to (ii).

Using Proposition 2.1(4), we get

$$DD_1(x_1,x_2,\mathrm{})=x_1(x_1+UD_1(x_1,x_2,\mathrm{}))(1+DD_1(x_1x_2,x_2x_3,\mathrm{})),$$

hence, by induction, we have (iii).

Finally, it is easy to check that Proposition 2.1(2) yields (iv). ∎

We denote the generating function $`C(x^2)x=\frac{12x^2\sqrt{14x^2}}{2x}`$ by $`\widehat{C}(x)`$. As an application to Theorem 6.1(i), we get the following:
(i) Let $`x_1=x`$ and $`x_j=1`$ for all $`j2`$. We have

$$UD_1(x,1,1,\mathrm{})=\underset{n0}{}\underset{\pi UD_n(1\text{-}3\text{-}2)}{}x^n=\widehat{C}(x),$$

as proved in Theorem 2.2.
(ii) Let $`\pi `$ be any permutation. We say that $`\pi _i`$ is right to left maxima if $`\pi _i>\pi _j`$ for all $`j>i`$. We denote the number of right to left maxima of $`\pi `$ by $`rlmax_\pi `$. In \[BCS\], there were proved that $`rlmax_\pi =\underset{j0}{}(1)^{j+1}1\text{-}2\text{-}\mathrm{}\text{-}j(\pi )`$. Therefore

$$\underset{n0}{}\underset{\pi UD_n(1\text{-}3\text{-}2)}{}x^ny^{rlmax_\pi }=UD_1(xy,y^1,y,y^1,\mathrm{})=\frac{x^2y^2(xy+\widehat{C}(x))}{1x^2y^2xy\widehat{C}(x)}.$$

In other words, the generating function for the number up-down permutations in $`UD_n(1\text{-}3\text{-}2)`$ having $`k`$ right to left maxima is given by

$$x^k\underset{j=0}{\overset{k2}{}}\left(\genfrac{}{}{0pt}{}{\frac{k2+j}{2}}{\frac{k2j}{2}}\right)\widehat{C}^j(x).$$

(iii) Let $`\pi `$ be any permutations. The number of increasing subsequences in $`\pi `$ is given by $`inc_\pi =_{j0}1\text{-}2\text{-}\mathrm{}\text{-}j(\pi )`$. Hence,

$$\underset{n0}{}\underset{\pi UD_n(1\text{-}3\text{-}2)}{}x^ny^{inc_\pi }=Ud_1(xy,y,y,\mathrm{})=\frac{x^2y^2}{xy{\displaystyle \frac{1}{xy{\displaystyle \frac{x^2y^4}{xy^2{\displaystyle \frac{1}{xy^2{\displaystyle \frac{x^2y^8}{\mathrm{}}}}}}}}}}.$$

(iv) The generating function for the number of up-down permutations that avoid $`1\text{-}3\text{-}2`$ and contain a prescribed number of occurrences of the pattern $`1\text{-}2\text{-}\mathrm{}\text{-}k`$ is given by the continued fraction in the statement of Theorem 6.1(i) together with $`x_1=x`$, $`x_k=y`$, and $`x_j=1`$ for all $`j1,k`$.

As an application to Theorem 6.1(ii), we have the following:
(i) The generating function for the number of up-up permutations in $`\mathrm{SS}_n(1\text{-}3\text{-}2)`$ is given by

$$UU_1(x,1,1,\mathrm{})=\frac{1\sqrt{14x^2}}{1+\sqrt{14x^2}}.$$

(ii) The distribution for the number of right to left maxima of up-up permutations avoiding $`1\text{-}3\text{-}2`$ is given by

$$\begin{array}{c}\underset{n0}{}\underset{\pi UU_n(1\text{-}3\text{-}2)}{}x^{|\pi |}y^{rlmax_\pi }=UU_1(xy,y^1,y,\mathrm{})=\hfill \\ =\frac{1}{1{\displaystyle \frac{1}{x^2y^2+xy\widehat{C}(x)}}}=\underset{d0}{}\underset{j=0}{\overset{d}{}}\left(\genfrac{}{}{0pt}{}{dj}{j}\right)x^{2j}\widehat{C}^{d2j}(x)y^d.\hfill \end{array}$$

(iii) The generating function for the number of up-up permutations that avoid $`1\text{-}3\text{-}2`$ and contain a prescribed number of occurrences of the pattern $`1\text{-}2\text{-}\mathrm{}\text{-}k`$ is given by the statement of Theorem 6.1(ii) together with $`x_1=x`$, $`x_k=y`$, and $`x_j=1`$ for all $`j1,k`$.

As an application to Theorem 6.1(iii), we have the following:
(i) The generating function for the number of down-down permutations in $`DD_n(1\text{-}3\text{-}2)`$ is given by

$$DD_1(x,1,1,\mathrm{})=\frac{1\sqrt{14x^2}}{1+\sqrt{14x^2}}.$$

(ii) The distribution for the number of right to left maxima of $`\pi DD_n(1\text{-}3\text{-}2)`$ is given by

$$\begin{array}{c}_{n0}\underset{\pi DD_n(1\text{-}3\text{-}2)}{}x^{|\pi |}y^{rlmax_\pi }=DD_1(xy,y^1,y,\mathrm{})=\frac{2x^2y^2}{\sqrt{14x^2}(1xy\widehat{C}(x)x^2y^2)}=\hfill \\ =\frac{2}{\sqrt{14x^2}}\underset{d2}{}\underset{j=0}{\overset{d2}{}}\left(\genfrac{}{}{0pt}{}{d2j}{j}\right)\widehat{C}^{d2j}(x)x^dy^d.\hfill \end{array}$$

(iii) The generating function for the number of down-down permutations avoiding $`1\text{-}3\text{-}2`$ and containing a prescribed number of occurrences of the pattern $`1\text{-}2\text{-}\mathrm{}\text{-}k`$ is given by the statement of Theorem 6.1(iii) together with $`x_1=x`$, $`x_k=y`$, and $`x_j=1`$ for all $`j1,k`$.

As an application to Theorem 6.1(iv), we have the following:
(i) The generating function for the number of down-up permutations in $`DU_n(1\text{-}3\text{-}2)`$ is given by

$$DU_1(x,1,1,\mathrm{})=x\left(\frac{1\sqrt{14x^2}}{2x^2}\right)^2x.$$

(ii) The distribution for the number of right to left maxima of $`\pi DU_n(1\text{-}3\text{-}2)`$ is given by

$$\begin{array}{c}\underset{n0}{}\underset{\pi DU_n(1\text{-}3\text{-}2)}{}x^{|\pi |}y^{rlmax_\pi }=DU_1(xy,y^1,y,\mathrm{})=\hfill \\ =\frac{1\sqrt{14x^2}}{1+\sqrt{14x^2}}xy+\frac{2}{\sqrt{14x^2}}\underset{d2}{}x^dy^d\underset{j=0}{\overset{d1}{}}\left(\genfrac{}{}{0pt}{}{d1j}{j}\right)\widehat{C}^{d12j}(x).\hfill \end{array}$$

(iii) The generating function for the number of down-up permutations avoiding $`1\text{-}3\text{-}2`$ and containing a prescribed number of occurrences of the pattern $`1\text{-}2\text{-}\mathrm{}\text{-}k`$ is given by the statement of Theorem 6.1(iv) together with $`x_1=x`$, $`x_k=y`$, and $`x_j=1`$ for all $`j1,k`$.

#### 6.1.2. A generalized pattern $`12\text{-}3\text{-}\mathrm{}\text{-}k`$

First of all, let us define

$$\begin{array}{c}UD_2(x_1,x_2,\mathrm{})=\underset{n0}{}\underset{\pi UD_n(1\text{-}3\text{-}2)}{}x_1^{|\pi |}_{j2}x_j^{12\text{-}3\text{-}\mathrm{}\text{-}j(\pi )},\hfill \\ UU_2(x_1,x_2,\mathrm{})=\underset{n0}{}\underset{\pi UU_n(1\text{-}3\text{-}2)}{}x_1^{|\pi |}_{j2}x_j^{12\text{-}3\text{-}\mathrm{}\text{-}j(\pi )},\hfill \end{array}$$

where $`12\text{-}3\text{-}\mathrm{}\text{-}j(\pi )`$ is the number of occurrences of the generalized pattern $`12\text{-}3\text{-}\mathrm{}\text{-}j`$ in $`\pi `$. Similarly to Theorem 6.1 we get the following result.

###### Theorem 6.2.

We have

* The generating function $`UD_2(x_1,x_2,\mathrm{})`$ is given by

$$\frac{x_1^2_{j2}x_j^{\left(\genfrac{}{}{0pt}{}{0}{j2}\right)}}{x_1_{j2}x_j^{\left(\genfrac{}{}{0pt}{}{0}{j2}\right)}{\displaystyle \frac{1}{x_1{\displaystyle \frac{x_1^2_{j2}x_j^{\left(\genfrac{}{}{0pt}{}{1}{j2}\right)}}{x_1_{j2}x_j^{\left(\genfrac{}{}{0pt}{}{1}{j2}\right)}{\displaystyle \frac{1}{x_1{\displaystyle \frac{x_1^2_{j2}x_j^{\left(\genfrac{}{}{0pt}{}{2}{j2}\right)}}{x_1_{j2}x_j^{\left(\genfrac{}{}{0pt}{}{2}{j2}\right)}{\displaystyle \frac{1}{x_1\mathrm{}}}}}}}}}}}};$$
* The generating function $`UU_2(x_1,x_2,\mathrm{})`$ is given by

$$\frac{1}{1{\displaystyle \frac{1}{x_1^2x_2+x_1x_2UD_2(x_1,x_2x_3,x_3x_4,\mathrm{})}}};$$

As an application to Theorem 6.2(i), we get that the number of up-down permutations avoiding $`1\text{-}3\text{-}2`$ of length $`2n+1`$ with $`k`$ rises is given by $`C_n\delta _{k,(n1)/2}`$, where $`\delta _{a,b}=1`$ if $`a=b`$, otherwise $`0`$.
As an another application, we get that the generating function for the number of up-down permutations avoiding $`1\text{-}3\text{-}2`$ and containing a prescribed number of occurrences of the pattern $`12\text{-}3\text{-}4\text{-}\mathrm{}\text{-}k`$ is given by the statement of Theorem 6.2(i) together with $`x_1=x`$, $`x_k=y`$, and $`x_j=1`$ for all $`j1,k`$. For example, for $`k=3`$ we get

(6.1)
$$\frac{x^2}{x{\displaystyle \frac{1}{x{\displaystyle \frac{x^2y}{xy{\displaystyle \frac{1}{x{\displaystyle \frac{x^2y^2}{xy^2\mathrm{}}}}}}}}}}.$$

As an application to Theorem 6.2(ii), we get that the generating function for the number of up-up permutations avoiding $`1\text{-}3\text{-}2`$ and containing a prescribed number of occurrences of the pattern $`12\text{-}3\text{-}4\text{-}\mathrm{}\text{-}k`$ is given by the statement of Theorem 6.2(ii) together with $`x_1=x`$, $`x_k=y`$, and $`x_j=1`$ for all $`j1,k`$. For example, for $`k=3`$ we get

(6.2)
$$\frac{1}{1{\displaystyle \frac{1}{x^2x{\displaystyle \frac{x^2y}{xy{\displaystyle \frac{1}{x{\displaystyle \frac{x^2y^2}{xy^2\mathrm{}}}}}}}}}}.$$

As a corollary to Theorem 6.2(i,ii), we have the following result.

###### Corollary 6.3.

The generating function $`_{n0}_{\pi A_n(1\text{-}3\text{-}2)}x_1^{|\pi |}_{j2}x_j^{12\text{-}3\text{-}\mathrm{}\text{-}j(\pi )}`$ is given by

$$1+x_1+(1+x_1)UU_2(x_1,x_2,x_3,\mathrm{}).$$

###### Proof.

Using Theorem 6.2(i,ii) we get that $`UD_2(x_1,x_2,x_3,\mathrm{})=x_1UU_2(x_1,x_2,x_3,\mathrm{})`$. On the other hand, by Identity 1.4 we have

$$\underset{n0}{}\underset{\pi A_n(1\text{-}3\text{-}2)}{}x_1^{|\pi |}\underset{j2}{}x_j^{12\text{-}3\text{-}\mathrm{}\text{-}j}=1+x_1+UD_2(x_1,x_2,x_3,\mathrm{})+UU_2(x_1,x_2,x_3,\mathrm{}).$$

Hence, by combining the two equations above we get the desired result. ∎

#### 6.1.3. A generalized pattern $`21\text{-}3\text{-}\mathrm{}\text{-}k`$

First of all, let us define another two objects

$$\begin{array}{c}UD_3(x_1,x_2,\mathrm{})=\underset{n0}{}\underset{\pi UD_n(1\text{-}3\text{-}2)}{}x_1^{|\pi |}_{j2}x_j^{21\text{-}3\text{-}\mathrm{}\text{-}j(\pi )},\hfill \\ UU_3(x_1,x_2,\mathrm{})=\underset{n0}{}\underset{\pi UU_n(1\text{-}3\text{-}2)}{}x_1^{|\pi |}_{j2}x_j^{21\text{-}3\text{-}\mathrm{}\text{-}j(\pi )},\hfill \end{array}$$

where $`21\text{-}3\text{-}\mathrm{}\text{-}j(\pi )`$ is the number of occurrences of the generalized pattern $`21\text{-}3\text{-}\mathrm{}\text{-}j`$ in $`\pi `$. Similarly to Theorem 6.1 we get

###### Theorem 6.4.

We have

* $`UD_3(x_1,x_2,\mathrm{})=UD_2(x_1,x_2,\mathrm{})`$;
* $`UU_3(x_1,x_2,\mathrm{})=\frac{1}{x_2}UU_2(x_1,x_2,\mathrm{})`$.

Theorem 6.4 and Identity 1.4 together with the fact that $`UD_2(x_1,x_2,x_3,\mathrm{})=x_1UU_2(x_1,x_2,x_3,\mathrm{})`$ yield the following corollary.

###### Corollary 6.5.

The generating function $`_{n0}_{\pi A_n(1\text{-}3\text{-}2)}x_1^{|\pi |}_{j2}x_j^{21\text{-}3\text{-}\mathrm{}\text{-}j(\pi )}`$ is given by

$$1+x_1+\left(x_1+\frac{1}{x_2}\right)UU_2(x_1,x_2,x_3,\mathrm{}).$$

### 6.2. Counting occurrences of $`1\text{-}3\text{-}2`$ in an alternating permutation

The second direction is to find the generating function $`A_\tau (x;r)`$ for the number of alternating permutation in $`\mathrm{SS}_n`$ that contain $`\tau `$ exactly $`r`$ times. Moreover, to find the generating functions $`UU_\tau (x;r)`$, $`UD_\tau (x;r)`$, $`DU_\tau (x;r)`$, and $`DD_\tau (x;r)`$ for the number of up-up, up-down, down-up, and down-down permutation in $`\mathrm{SS}_n`$ that contain $`\tau `$ exactly $`r`$ times, respectively.

For $`\tau =1\text{-}3\text{-}2`$, the block decomposition approach \[MV5\] in the alternating (up-up, up-down, down-up, down-down) permutations gives a complete answer for any given $`r`$ (as described in Section 2 for $`r=0`$, and Section 4 for $`r=1`$), and we get the following result.

###### Theorem 6.6.

We have

$$\begin{array}{cc}(1)\hfill & \{\begin{array}{c}UD_{1\text{-}3\text{-}2}(x;0)=\frac{12x^2}{2x}\frac{1}{2x}(14x^2)^{\frac{1}{2}};\hfill \\ \\ UD_{1\text{-}3\text{-}2}(x;1)=\frac{1}{2x}+\frac{12x^2}{2x}(14x^2)^{\frac{1}{2}};\hfill \\ \\ UD_{1\text{-}3\text{-}2}(x;2)=\frac{1}{2x}\frac{16x^2+6x^4}{2x}(14x^2)^{\frac{3}{2}};\hfill \\ \\ UD_{1\text{-}3\text{-}2}(x;3)=\frac{2(1x^2)}{x}+\frac{222x^2+80x^498x^6+16x^8}{x}(14x^2)^{\frac{5}{2}},\hfill \end{array}\hfill \\ & \\ (2)\hfill & \{\begin{array}{c}UU_{1\text{-}3\text{-}2}(x;0)=\frac{12x^2}{2x^2}\frac{1}{2x^2}(14x^2)^{\frac{1}{2}};\hfill \\ \\ UU_{1\text{-}3\text{-}2}(x;1)=\frac{x^21}{x^2}+\frac{13x^2}{x^2}(14x^2)^{\frac{1}{2}};\hfill \\ \\ UU_{1\text{-}3\text{-}2}(x;2)=\frac{45x^2}{2x^2}\frac{429x^2+54x^416x^6}{2x^2}(14x^2)^{\frac{3}{2}};\hfill \\ \\ UU_{1\text{-}3\text{-}2}(x;3)=\frac{1311x^2+2x^4}{2x^2}+\frac{13152x^2+612x^4940x^6+384x^8}{2x^2}(14x^2)^{\frac{5}{2}},\hfill \end{array}\hfill \\ & \\ (3)\hfill & \{\begin{array}{c}\\ A_{1\text{-}3\text{-}2}(x;0)=\frac{1+x2x^22x^3}{2x^2}\frac{1+x}{2x^2}(14x^2)^{\frac{1}{2}};\hfill \\ \\ A_{1\text{-}3\text{-}2}(x;1)=\frac{2x^2x2}{2x^2}+\frac{2+x6x^22x^3}{2x^2}(14x^2)^{\frac{1}{2}};\hfill \\ \\ A_{1\text{-}3\text{-}2}(x;2)=\frac{4+x5x^2}{2x^2}\frac{4+x29x^26x^3+54x^4+6x^516x^6}{2x^2}(14x^2)^{\frac{3}{2}};\hfill \\ \\ A_{1\text{-}3\text{-}2}(x;3)=\frac{134x11x^2+4x^3+2x^4}{2x^2}+\hfill \\ +\frac{13+4x152x^244x^3+612x^4+160x^5940x^6196x^7+384x^8+32x^9}{2x^2}(14x^2)^{\frac{5}{2}}.\hfill \end{array}\hfill \end{array}$$

Finally, we conclude with some open problems suggested by the results in the previous sections. For example: (1) We found that the number of alternating permutations in $`A_n(1\text{-}3\text{-}2,1\text{-}2\text{-}\mathrm{}\text{-}k)`$ is equal to the number of alternating permutations in $`A_n(1\text{-}3\text{-}2,2\text{-}1\text{-}3\text{-}\mathrm{}\text{-}k)`$ (see Corollary 2.9). The question, if there is a bijective combinatorial proof for this property. (2) If there exists an explicit formula for $`A_{1\text{-}3\text{-}2}(x;r)`$ for any given $`r0`$. (3) If there exist bijective combinatorial proofs for the formulas in the statement of Theorem 6.6.