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.

A229886 Number of 5 up, 5 down permutations of [n].

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 6, 21, 56, 126, 252, 2562, 14442, 59487, 199627, 578005, 8330800, 65056960, 363823800, 1628423880, 6190034016, 115452938151, 1152005977431, 8137667253101, 45527993728141, 214265281290061, 4904624749585886, 59578069604921361
Offset: 0

Views

Author

Alois P. Heinz, Oct 02 2013

Keywords

Comments

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

Examples

			a(6) = 1: 123456.
a(7) = 6: 1234576, 1234675, 1235674, 1245673, 1345672, 2345671.
a(8) = 21: 12345876, 12346875, 12347865, 12356874, 12357864, 12367854, 12456873, 12457863, 12467853, 12567843, 13456872, 13457862, 13467852, 13567842, 14567832, 23456871, 23457861, 23467851, 23567841, 24567831, 34567821.
		

Crossrefs

Column k=5 of A229892.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(`if`(t=5,
           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..35);
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Sum[If[t == 5, 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, 35] (* Jean-François Alcover, Dec 22 2020, after Alois P. Heinz *)