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.

A246247 Number of permutations of [n] with exactly two occurrences of the consecutive step pattern up, down, down.

Original entry on oeis.org

99, 2214, 38394, 591543, 8826246, 131367258, 1989555210, 30951663300, 497599843140, 8291940960690, 143459287215300, 2578465192541220, 48147387009459165, 933704978071539690, 18794023286090727870, 392361396798154377681, 8489006744706293477274
Offset: 7

Views

Author

Alois P. Heinz, Aug 20 2014

Keywords

Crossrefs

Column k=2 of A242819.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1, expand(
          add(b(u-j, o+j-1, [1, 3, 1][t])*`if`(t=3, x, 1), j=1..u)+
          add(b(u+j-1, o-j, 2), j=1..o)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0, 1)):
    seq([T(n)][3], n=7..20); # Vaclav Kotesovec, Aug 22 2014 after Alois P. Heinz
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Expand[Sum[b[u - j, o + j - 1, {1, 3, 1}[[t]]]*If[t == 3, x, 1], {j, 1, u}] + Sum[b[u + j - 1, o - j, 2], {j, 1, o}]]];
    a[n_] := Coefficient[b[n, 0, 1], x, 2];
    a /@ Range[7, 20] (* Jean-François Alcover, Dec 28 2020, after Maple *)

Formula

a(n) ~ c * (3*sqrt(3)/(2*Pi))^n * n! * n^2, where c = 0.10205535828170995196503... = c0 * (c0-1)^2 / 18, and c0 = (1 + exp(Pi/sqrt(3))) * sqrt(3) / (2*Pi). - Vaclav Kotesovec, Aug 22 2014