Av(1234, 2143)
View Raw Data
Generating Function
\(\displaystyle \frac{x^{2}-4 x +1}{\left(4 x -1\right) \left(x -1\right)}\)
Counting Sequence
1, 1, 2, 6, 22, 86, 342, 1366, 5462, 21846, 87382, 349526, 1398102, 5592406, 22369622, ...
Implicit Equation for the Generating Function
\(\displaystyle \left(4 x -1\right) \left(x -1\right) F \! \left(x \right)-x^{2}+4 x -1 = 0\)
Recurrence
\(\displaystyle a \! \left(0\right) = 1\)
\(\displaystyle a \! \left(1\right) = 1\)
\(\displaystyle a \! \left(2\right) = 2\)
\(\displaystyle a \! \left(n +1\right) = 4 a \! \left(n \right)-2, \quad n \geq 3\)
Explicit Closed Form
\(\displaystyle \left\{\begin{array}{cc}1 & n =0 \\ \frac{2}{3}+\frac{4^{n}}{12} & \text{otherwise} \end{array}\right.\)
Heatmap

To create this heatmap, we sampled 1,000,000 permutations of length 300 uniformly at random. The color of the point \((i, j)\) represents how many permutations have value \(j\) at index \(i\) (darker = more).

This specification was found using the strategy pack "Point Placements" and has 93 rules.

Found on January 18, 2022.

Finding the specification took 10 seconds.

This tree is too big to show here. Click to view tree on new page.

Copy 93 equations to clipboard:
\(\begin{align*} F_{0}\! \left(x \right) &= F_{1}\! \left(x \right)+F_{2}\! \left(x \right)\\ F_{1}\! \left(x \right) &= 1\\ F_{2}\! \left(x \right) &= F_{3}\! \left(x \right)\\ F_{3}\! \left(x \right) &= F_{4}\! \left(x \right) F_{5}\! \left(x \right)\\ F_{4}\! \left(x \right) &= x\\ F_{5}\! \left(x \right) &= F_{27}\! \left(x \right)+F_{6}\! \left(x \right)\\ F_{6}\! \left(x \right) &= F_{1}\! \left(x \right)+F_{7}\! \left(x \right)\\ F_{7}\! \left(x \right) &= F_{8}\! \left(x \right)\\ F_{8}\! \left(x \right) &= F_{4}\! \left(x \right) F_{9}\! \left(x \right)\\ F_{9}\! \left(x \right) &= F_{10}\! \left(x \right)+F_{13}\! \left(x \right)\\ F_{10}\! \left(x \right) &= F_{1}\! \left(x \right)+F_{11}\! \left(x \right)\\ F_{11}\! \left(x \right) &= F_{12}\! \left(x \right)\\ F_{12}\! \left(x \right) &= F_{10}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{13}\! \left(x \right) &= F_{14}\! \left(x \right)+F_{7}\! \left(x \right)\\ F_{14}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{16}\! \left(x \right)+F_{26}\! \left(x \right)\\ F_{15}\! \left(x \right) &= 0\\ F_{16}\! \left(x \right) &= F_{17}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{17}\! \left(x \right) &= F_{18}\! \left(x \right)+F_{21}\! \left(x \right)\\ F_{18}\! \left(x \right) &= F_{19}\! \left(x \right)+F_{4}\! \left(x \right)\\ F_{19}\! \left(x \right) &= F_{20}\! \left(x \right)\\ F_{20}\! \left(x \right) &= F_{11}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{21}\! \left(x \right) &= F_{22}\! \left(x \right)+F_{24}\! \left(x \right)\\ F_{22}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{16}\! \left(x \right)+F_{23}\! \left(x \right)\\ F_{23}\! \left(x \right) &= F_{4}\! \left(x \right) F_{7}\! \left(x \right)\\ F_{24}\! \left(x \right) &= F_{25}\! \left(x \right)\\ F_{25}\! \left(x \right) &= F_{14}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{26}\! \left(x \right) &= F_{13}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{27}\! \left(x \right) &= F_{2}\! \left(x \right)+F_{28}\! \left(x \right)\\ F_{28}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{29}\! \left(x \right)+F_{91}\! \left(x \right)\\ F_{29}\! \left(x \right) &= F_{30}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{30}\! \left(x \right) &= F_{31}\! \left(x \right)+F_{38}\! \left(x \right)\\ F_{31}\! \left(x \right) &= F_{32}\! \left(x \right)+F_{35}\! \left(x \right)\\ F_{32}\! \left(x \right) &= F_{33}\! \left(x \right)\\ F_{33}\! \left(x \right) &= F_{34}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{34}\! \left(x \right) &= F_{1}\! \left(x \right)+F_{4}\! \left(x \right)\\ F_{35}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{16}\! \left(x \right)+F_{36}\! \left(x \right)\\ F_{36}\! \left(x \right) &= F_{37}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{37}\! \left(x \right) &= F_{22}\! \left(x \right)+F_{7}\! \left(x \right)\\ F_{38}\! \left(x \right) &= F_{39}\! \left(x \right)+F_{80}\! \left(x \right)\\ F_{39}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{29}\! \left(x \right)+F_{40}\! \left(x \right)\\ F_{40}\! \left(x \right) &= F_{4}\! \left(x \right) F_{41}\! \left(x \right)\\ F_{41}\! \left(x \right) &= F_{2}\! \left(x \right)+F_{42}\! \left(x \right)\\ F_{42}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{43}\! \left(x \right)+F_{79}\! \left(x \right)\\ F_{43}\! \left(x \right) &= F_{4}\! \left(x \right) F_{44}\! \left(x \right)\\ F_{44}\! \left(x \right) &= F_{45}\! \left(x \right)+F_{46}\! \left(x \right)\\ F_{45}\! \left(x \right) &= F_{22}\! \left(x \right)+F_{4}\! \left(x \right)\\ F_{46}\! \left(x \right) &= F_{42}\! \left(x \right)+F_{47}\! \left(x \right)\\ F_{47}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{48}\! \left(x \right)+F_{64}\! \left(x \right)+F_{78}\! \left(x \right)\\ F_{48}\! \left(x \right) &= F_{4}\! \left(x \right) F_{49}\! \left(x \right)\\ F_{49}\! \left(x \right) &= F_{50}\! \left(x \right)+F_{57}\! \left(x \right)\\ F_{50}\! \left(x \right) &= F_{51}\! \left(x \right)+F_{54}\! \left(x \right)\\ F_{51}\! \left(x \right) &= F_{52}\! \left(x \right)\\ F_{52}\! \left(x \right) &= F_{4}\! \left(x \right) F_{53}\! \left(x \right)\\ F_{53}\! \left(x \right) &= F_{4}\! \left(x \right)\\ F_{54}\! \left(x \right) &= F_{55}\! \left(x \right)\\ F_{55}\! \left(x \right) &= F_{4}\! \left(x \right) F_{56}\! \left(x \right)\\ F_{56}\! \left(x \right) &= F_{22}\! \left(x \right)\\ F_{57}\! \left(x \right) &= F_{58}\! \left(x \right)+F_{61}\! \left(x \right)\\ F_{58}\! \left(x \right) &= 2 F_{15}\! \left(x \right)+F_{48}\! \left(x \right)+F_{59}\! \left(x \right)\\ F_{59}\! \left(x \right) &= F_{4}\! \left(x \right) F_{60}\! \left(x \right)\\ F_{60}\! \left(x \right) &= F_{42}\! \left(x \right)\\ F_{61}\! \left(x \right) &= F_{62}\! \left(x \right)\\ F_{62}\! \left(x \right) &= F_{4}\! \left(x \right) F_{63}\! \left(x \right)\\ F_{63}\! \left(x \right) &= F_{47}\! \left(x \right)\\ F_{64}\! \left(x \right) &= F_{4}\! \left(x \right) F_{65}\! \left(x \right)\\ F_{65}\! \left(x \right) &= F_{66}\! \left(x \right)+F_{72}\! \left(x \right)\\ F_{66}\! \left(x \right) &= F_{42}\! \left(x \right)+F_{67}\! \left(x \right)\\ F_{67}\! \left(x \right) &= F_{68}\! \left(x \right)\\ F_{68}\! \left(x \right) &= F_{4}\! \left(x \right) F_{69}\! \left(x \right)\\ F_{69}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{43}\! \left(x \right)+F_{70}\! \left(x \right)\\ F_{70}\! \left(x \right) &= F_{4}\! \left(x \right) F_{71}\! \left(x \right)\\ F_{71}\! \left(x \right) &= F_{2}\! \left(x \right)+F_{69}\! \left(x \right)\\ F_{72}\! \left(x \right) &= F_{47}\! \left(x \right)+F_{73}\! \left(x \right)\\ F_{73}\! \left(x \right) &= F_{74}\! \left(x \right)\\ F_{74}\! \left(x \right) &= F_{4}\! \left(x \right) F_{75}\! \left(x \right)\\ F_{75}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{48}\! \left(x \right)+F_{64}\! \left(x \right)+F_{76}\! \left(x \right)\\ F_{76}\! \left(x \right) &= F_{4}\! \left(x \right) F_{77}\! \left(x \right)\\ F_{77}\! \left(x \right) &= F_{28}\! \left(x \right)+F_{75}\! \left(x \right)\\ F_{78}\! \left(x \right) &= F_{28}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{79}\! \left(x \right) &= F_{2}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{80}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{64}\! \left(x \right)+F_{81}\! \left(x \right)+F_{89}\! \left(x \right)\\ F_{81}\! \left(x \right) &= F_{4}\! \left(x \right) F_{82}\! \left(x \right)\\ F_{82}\! \left(x \right) &= F_{83}\! \left(x \right)+F_{86}\! \left(x \right)\\ F_{83}\! \left(x \right) &= F_{84}\! \left(x \right)+F_{85}\! \left(x \right)\\ F_{84}\! \left(x \right) &= F_{52}\! \left(x \right)\\ F_{85}\! \left(x \right) &= F_{55}\! \left(x \right)\\ F_{86}\! \left(x \right) &= F_{87}\! \left(x \right)+F_{88}\! \left(x \right)\\ F_{87}\! \left(x \right) &= 2 F_{15}\! \left(x \right)+F_{59}\! \left(x \right)+F_{81}\! \left(x \right)\\ F_{88}\! \left(x \right) &= F_{62}\! \left(x \right)\\ F_{89}\! \left(x \right) &= F_{4}\! \left(x \right) F_{90}\! \left(x \right)\\ F_{90}\! \left(x \right) &= F_{28}\! \left(x \right)+F_{47}\! \left(x \right)\\ F_{91}\! \left(x \right) &= F_{4}\! \left(x \right) F_{92}\! \left(x \right)\\ F_{92}\! \left(x \right) &= F_{71}\! \left(x \right)+F_{77}\! \left(x \right)\\ \end{align*}\)

This specification was found using the strategy pack "Regular Insertion Encoding Bottom" and has 96 rules.

Found on April 28, 2021.

Finding the specification took 3 seconds.

This tree is too big to show here. Click to view tree on new page.

Copy 96 equations to clipboard:
\(\begin{align*} F_{0}\! \left(x \right) &= F_{1}\! \left(x \right)+F_{2}\! \left(x \right)\\ F_{1}\! \left(x \right) &= 1\\ F_{2}\! \left(x \right) &= F_{3}\! \left(x \right)\\ F_{3}\! \left(x \right) &= F_{13}\! \left(x \right) F_{4}\! \left(x \right)\\ F_{4}\! \left(x \right) &= F_{0}\! \left(x \right)+F_{5}\! \left(x \right)\\ F_{5}\! \left(x \right) &= F_{29}\! \left(x \right)+F_{6}\! \left(x \right)\\ F_{6}\! \left(x \right) &= F_{7}\! \left(x \right)\\ F_{7}\! \left(x \right) &= F_{13}\! \left(x \right) F_{8}\! \left(x \right)\\ F_{8}\! \left(x \right) &= F_{10}\! \left(x \right)+F_{9}\! \left(x \right)\\ F_{9}\! \left(x \right) &= F_{1}\! \left(x \right)+F_{6}\! \left(x \right)\\ F_{10}\! \left(x \right) &= F_{11}\! \left(x \right)+F_{15}\! \left(x \right)\\ F_{11}\! \left(x \right) &= F_{12}\! \left(x \right)\\ F_{12}\! \left(x \right) &= F_{13}\! \left(x \right) F_{14}\! \left(x \right)\\ F_{13}\! \left(x \right) &= x\\ F_{14}\! \left(x \right) &= F_{1}\! \left(x \right)+F_{11}\! \left(x \right)\\ F_{15}\! \left(x \right) &= F_{16}\! \left(x \right)+F_{17}\! \left(x \right)+F_{19}\! \left(x \right)\\ F_{16}\! \left(x \right) &= 0\\ F_{17}\! \left(x \right) &= F_{13}\! \left(x \right) F_{18}\! \left(x \right)\\ F_{18}\! \left(x \right) &= F_{15}\! \left(x \right)+F_{6}\! \left(x \right)\\ F_{19}\! \left(x \right) &= F_{13}\! \left(x \right) F_{20}\! \left(x \right)\\ F_{20}\! \left(x \right) &= F_{21}\! \left(x \right)+F_{24}\! \left(x \right)\\ F_{21}\! \left(x \right) &= F_{13}\! \left(x \right)+F_{22}\! \left(x \right)\\ F_{22}\! \left(x \right) &= F_{16}\! \left(x \right)+F_{19}\! \left(x \right)+F_{23}\! \left(x \right)\\ F_{23}\! \left(x \right) &= F_{13}\! \left(x \right) F_{6}\! \left(x \right)\\ F_{24}\! \left(x \right) &= F_{25}\! \left(x \right)+F_{27}\! \left(x \right)\\ F_{25}\! \left(x \right) &= F_{26}\! \left(x \right)\\ F_{26}\! \left(x \right) &= F_{11}\! \left(x \right) F_{13}\! \left(x \right)\\ F_{27}\! \left(x \right) &= F_{28}\! \left(x \right)\\ F_{28}\! \left(x \right) &= F_{13}\! \left(x \right) F_{15}\! \left(x \right)\\ F_{29}\! \left(x \right) &= F_{16}\! \left(x \right)+F_{30}\! \left(x \right)+F_{72}\! \left(x \right)\\ F_{30}\! \left(x \right) &= F_{13}\! \left(x \right) F_{31}\! \left(x \right)\\ F_{31}\! \left(x \right) &= F_{32}\! \left(x \right)+F_{33}\! \left(x \right)\\ F_{32}\! \left(x \right) &= F_{2}\! \left(x \right)+F_{29}\! \left(x \right)\\ F_{33}\! \left(x \right) &= F_{34}\! \left(x \right)+F_{53}\! \left(x \right)\\ F_{34}\! \left(x \right) &= F_{16}\! \left(x \right)+F_{35}\! \left(x \right)+F_{37}\! \left(x \right)\\ F_{35}\! \left(x \right) &= F_{13}\! \left(x \right) F_{36}\! \left(x \right)\\ F_{36}\! \left(x \right) &= F_{2}\! \left(x \right)+F_{34}\! \left(x \right)\\ F_{37}\! \left(x \right) &= F_{13}\! \left(x \right) F_{38}\! \left(x \right)\\ F_{38}\! \left(x \right) &= F_{39}\! \left(x \right)+F_{42}\! \left(x \right)\\ F_{39}\! \left(x \right) &= F_{13}\! \left(x \right)+F_{40}\! \left(x \right)\\ F_{40}\! \left(x \right) &= F_{16}\! \left(x \right)+F_{37}\! \left(x \right)+F_{41}\! \left(x \right)\\ F_{41}\! \left(x \right) &= F_{13}\! \left(x \right) F_{2}\! \left(x \right)\\ F_{42}\! \left(x \right) &= F_{22}\! \left(x \right)+F_{43}\! \left(x \right)\\ F_{43}\! \left(x \right) &= F_{16}\! \left(x \right)+F_{44}\! \left(x \right)+F_{45}\! \left(x \right)+F_{56}\! \left(x \right)\\ F_{44}\! \left(x \right) &= F_{13}\! \left(x \right) F_{29}\! \left(x \right)\\ F_{45}\! \left(x \right) &= F_{13}\! \left(x \right) F_{46}\! \left(x \right)\\ F_{46}\! \left(x \right) &= F_{47}\! \left(x \right)+F_{48}\! \left(x \right)\\ F_{47}\! \left(x \right) &= F_{40}\! \left(x \right)+F_{43}\! \left(x \right)\\ F_{48}\! \left(x \right) &= F_{49}\! \left(x \right)+F_{51}\! \left(x \right)\\ F_{49}\! \left(x \right) &= F_{50}\! \left(x \right)\\ F_{50}\! \left(x \right) &= F_{13}\! \left(x \right) F_{34}\! \left(x \right)\\ F_{51}\! \left(x \right) &= F_{52}\! \left(x \right)\\ F_{52}\! \left(x \right) &= F_{13}\! \left(x \right) F_{53}\! \left(x \right)\\ F_{53}\! \left(x \right) &= F_{16}\! \left(x \right)+F_{45}\! \left(x \right)+F_{54}\! \left(x \right)+F_{56}\! \left(x \right)\\ F_{54}\! \left(x \right) &= F_{13}\! \left(x \right) F_{55}\! \left(x \right)\\ F_{55}\! \left(x \right) &= F_{29}\! \left(x \right)+F_{53}\! \left(x \right)\\ F_{56}\! \left(x \right) &= F_{13}\! \left(x \right) F_{57}\! \left(x \right)\\ F_{57}\! \left(x \right) &= F_{58}\! \left(x \right)+F_{65}\! \left(x \right)\\ F_{58}\! \left(x \right) &= F_{59}\! \left(x \right)+F_{62}\! \left(x \right)\\ F_{59}\! \left(x \right) &= F_{60}\! \left(x \right)\\ F_{60}\! \left(x \right) &= F_{13}\! \left(x \right) F_{61}\! \left(x \right)\\ F_{61}\! \left(x \right) &= F_{13}\! \left(x \right)\\ F_{62}\! \left(x \right) &= 2 F_{16}\! \left(x \right)+F_{56}\! \left(x \right)+F_{63}\! \left(x \right)\\ F_{63}\! \left(x \right) &= F_{13}\! \left(x \right) F_{64}\! \left(x \right)\\ F_{64}\! \left(x \right) &= F_{40}\! \left(x \right)\\ F_{65}\! \left(x \right) &= F_{66}\! \left(x \right)+F_{69}\! \left(x \right)\\ F_{66}\! \left(x \right) &= F_{67}\! \left(x \right)\\ F_{67}\! \left(x \right) &= F_{13}\! \left(x \right) F_{68}\! \left(x \right)\\ F_{68}\! \left(x \right) &= F_{22}\! \left(x \right)\\ F_{69}\! \left(x \right) &= F_{70}\! \left(x \right)\\ F_{70}\! \left(x \right) &= F_{13}\! \left(x \right) F_{71}\! \left(x \right)\\ F_{71}\! \left(x \right) &= F_{43}\! \left(x \right)\\ F_{72}\! \left(x \right) &= F_{13}\! \left(x \right) F_{73}\! \left(x \right)\\ F_{73}\! \left(x \right) &= F_{74}\! \left(x \right)+F_{81}\! \left(x \right)\\ F_{74}\! \left(x \right) &= F_{75}\! \left(x \right)+F_{78}\! \left(x \right)\\ F_{75}\! \left(x \right) &= F_{76}\! \left(x \right)\\ F_{76}\! \left(x \right) &= F_{13}\! \left(x \right) F_{77}\! \left(x \right)\\ F_{77}\! \left(x \right) &= F_{1}\! \left(x \right)+F_{13}\! \left(x \right)\\ F_{78}\! \left(x \right) &= F_{16}\! \left(x \right)+F_{72}\! \left(x \right)+F_{79}\! \left(x \right)\\ F_{79}\! \left(x \right) &= F_{13}\! \left(x \right) F_{80}\! \left(x \right)\\ F_{80}\! \left(x \right) &= F_{2}\! \left(x \right)+F_{40}\! \left(x \right)\\ F_{81}\! \left(x \right) &= F_{82}\! \left(x \right)+F_{85}\! \left(x \right)\\ F_{82}\! \left(x \right) &= F_{16}\! \left(x \right)+F_{19}\! \left(x \right)+F_{83}\! \left(x \right)\\ F_{83}\! \left(x \right) &= F_{13}\! \left(x \right) F_{84}\! \left(x \right)\\ F_{84}\! \left(x \right) &= F_{22}\! \left(x \right)+F_{6}\! \left(x \right)\\ F_{85}\! \left(x \right) &= F_{16}\! \left(x \right)+F_{45}\! \left(x \right)+F_{86}\! \left(x \right)+F_{88}\! \left(x \right)\\ F_{86}\! \left(x \right) &= F_{13}\! \left(x \right) F_{87}\! \left(x \right)\\ F_{87}\! \left(x \right) &= F_{29}\! \left(x \right)+F_{43}\! \left(x \right)\\ F_{88}\! \left(x \right) &= F_{13}\! \left(x \right) F_{89}\! \left(x \right)\\ F_{89}\! \left(x \right) &= F_{90}\! \left(x \right)+F_{93}\! \left(x \right)\\ F_{90}\! \left(x \right) &= F_{91}\! \left(x \right)+F_{92}\! \left(x \right)\\ F_{91}\! \left(x \right) &= F_{60}\! \left(x \right)\\ F_{92}\! \left(x \right) &= 2 F_{16}\! \left(x \right)+F_{63}\! \left(x \right)+F_{88}\! \left(x \right)\\ F_{93}\! \left(x \right) &= F_{94}\! \left(x \right)+F_{95}\! \left(x \right)\\ F_{94}\! \left(x \right) &= F_{67}\! \left(x \right)\\ F_{95}\! \left(x \right) &= F_{70}\! \left(x \right)\\ \end{align*}\)