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.

Showing 1-2 of 2 results.

A229885 Number of 4 up, 4 down permutations of [n].

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 5, 15, 35, 70, 574, 2674, 9274, 26599, 305747, 1944033, 8995805, 33757360, 498851248, 4017418768, 23236611280, 107709888805, 1945409895065, 18965460022971, 131635127294783, 726401013530416, 15505381392117616, 177447751441161616
Offset: 0

Views

Author

Alois P. Heinz, Oct 02 2013

Keywords

Comments

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

Examples

			a(5) = 1: 12345.
a(6) = 5: 123465, 123564, 124563, 134562, 234561.
a(7) = 15: 1234765, 1235764, 1236754, 1245763, 1246753, 1256743, 1345762, 1346752, 1356742, 1456732, 2345761, 2346751, 2356741, 2456731, 3456721.
		

Crossrefs

Column k=4 of A229892.
Cf. A005983.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(`if`(t=4,
           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 == 4, 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 *)

A259452 Number of 5 up, 5 down, 5 up, ... permutations of length 5n+1.

Original entry on oeis.org

1, 1, 252, 578005, 6190034016, 214265281290061, 19157603395806362772, 3800502511986185228829385, 1498722661993096106927612109936, 1081056808393919319749313795137642521, 1336319624105519211256870506149168604698792
Offset: 0

Views

Author

N. J. A. Sloane, Jun 28 2015

Keywords

References

  • P. R. Stein, personal communication.

Crossrefs

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, 5*n+1, 0):
    seq(a(n), n=0..10);  # Alois P. Heinz, Jul 02 2015
  • Mathematica
    k = 5; b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Sum[If[t == k, b[o - j, u + j - 1, 1], b[u + j - 1, o - j, t + 1]], {j, 1, o}]]; Array[b[0, k # + 1, 0] &, 10] (* Michael De Vlieger, Oct 15 2017, after Jean-François Alcover at A005983 *)

Extensions

More terms from Alois P. Heinz, Jul 02 2015
Showing 1-2 of 2 results.