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.

A230130 Number of permutations of order n with the length of the longest run equal to 7.

Original entry on oeis.org

2, 28, 362, 4720, 64020, 913440, 13760472, 219040274, 3681354658, 65231186514, 1216489698082, 23832126613268, 489566931234322, 10526180908026522, 236475437787567496, 5541690642862917134, 135258139216049657102, 3433304061341792767884, 90508485528963754208076
Offset: 7

Views

Author

Alois P. Heinz, Oct 10 2013

Keywords

Crossrefs

Column l=7 of A211318.
A diagonal of A010026.

Programs

  • Maple
    g:= proc(u, o, t) option remember; `if`(u+o=0, 1,
           add(g(o+j-1, u-j, 2), j=1..u) +`if`(t<7,
           add(g(u+j-1, o-j, t+1), j=1..o), 0))
        end:
    b:= proc(u, o, t) option remember; `if`(t=7, g(u, o, t),
           add(b(o+j-1, u-j, 2), j=1..u)+
           add(b(u+j-1, o-j, t+1), j=1..o))
        end:
    a:= n-> add(b(j-1, n-j, 1), j=1..n):
    seq(a(n), n=7..30);
  • Mathematica
    length = 7;
    g[u_, o_, t_] := g[u, o, t] = If[u+o == 0, 1, Sum[g[o + j - 1, u - j, 2], {j, 1, u}] + If[tJean-François Alcover, Aug 18 2018, after Alois P. Heinz *)