cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A229884 Number of 3 up, 3 down permutations of [n].

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 10, 20, 125, 461, 1301, 11210, 55220, 202840, 2223859, 13690951, 61889101, 823947856, 6087160726, 32676403052, 511799407517, 4411241879141, 27418828825961, 493869702112622, 4864805677935368, 34361404413755056, 699648473127100771
Offset: 0

Views

Author

Alois P. Heinz, Oct 02 2013

Keywords

Comments

Limit n->infinity (a(n)/n!)^(1/n) = 0.4494840644898... . - Vaclav Kotesovec, Sep 06 2014

Examples

			a(4) = 1: 1234.
a(5) = 4: 12354, 12453, 13452, 23451.
a(6) = 10: 123654, 124653, 125643, 134652, 135642, 145632, 234651, 235641, 245631, 345621.
a(7) = 20: 1237654, 1247653, 1257643, 1267543, 1347652, 1357642, 1367542, 1457632, 1467532, 1567432, 2347651, 2357641, 2367541, 2457631, 2467531, 2567431, 3457621, 3467521, 3567421, 4567321.
		

Crossrefs

Column k=3 of A229892.
Cf. A005982.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(`if`(t=3,
           b(o-j, u+j-1, 1), b(u+j-1, o-j, t+1)), j=1..o))
        end:
    a:= n-> b(0, n, 0):
    seq(a(n), n=0..30);
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Sum[If[t == 3, b[o - j, u + j - 1, 1], b[u + j - 1, o - j, t + 1]], {j, 1, o}]];
    a[n_] := b[0, n, 0];
    a /@ Range[0, 30] (* Jean-François Alcover, Dec 21 2020, after Alois P. Heinz *)