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.
%I A178515 #11 Nov 01 2012 11:36:24 %S A178515 1,2,0,4,0,0,9,1,0,0,21,5,0,0,0,51,25,0,0,0,0,127,105,0,0,0,0,0,323, %T A178515 420,21,0,0,0,0,0,835,1596,189,0,0,0,0,0,0,2188,5880,1428,0,0,0,0,0,0, %U A178515 0,5798,21120,8778,0,0,0,0,0,0,0,0,15511,74415,48741,1485,0,0,0,0,0,0,0,0,41835,258115,249249,19305,0 %N A178515 Triangle read by rows: T(n,k) is the number of involutions of {1,2,...,n} having genus k (see first comment for definition of genus). %C A178515 The genus g(p) of a permutation p of {1,2,...,n} is defined by g(p)=(1/2)[n+1-z(p)-z(cp')], where p' is the inverse permutation of p, c = 234...n1 = (1,2,...,n), and z(q) is the number of cycles of the permutation q. %C A178515 The sum of the entries in row n is A000085(n). %C A178515 T(n,0)=A001006(n) (the Motzkin numbers). %D A178515 S. Dulucq and R. Simion, Combinatorial statistics on alternating permutations, J. Algebraic Combinatorics, 8, 1998, 169-191. %e A178515 T(4,1)=1 because p=3412 is the only involution of {1,2,3,4} with genus 1. This follows easily from the fact that a permutation p of {1,2,...,n} has genus 0 if and only if the cycle decomposition of p gives a noncrossing partition of {1,2,...,n} and each cycle of p is increasing (see Lemma 2.1 of the Dulucq-Simion reference). [Also, for p=3412=(13)(24) we have cp'=2341*3412=4123=(1432) and so g(p)=(1/2)(4+1-2-1)=1.] %e A178515 Triangle starts: %e A178515 [ 1] 1, %e A178515 [ 2] 2, 0, %e A178515 [ 3] 4, 0, 0, %e A178515 [ 4] 9, 1, 0, 0, %e A178515 [ 5] 21, 5, 0, 0, 0, %e A178515 [ 6] 51, 25, 0, 0, 0, 0, %e A178515 [ 7] 127, 105, 0, 0, 0, 0, 0, %e A178515 [ 8] 323, 420, 21, 0, 0, 0, 0, 0, %e A178515 [ 9] 835, 1596, 189, 0, 0, 0, 0, 0, 0, %e A178515 [10] 2188, 5880, 1428, 0, 0, 0, 0, 0, 0, 0, %e A178515 [11] 5798, 21120, 8778, 0, 0, 0, 0, 0, 0, 0, 0, %e A178515 [12] 15511, 74415, 48741, 1485, 0, 0, 0, 0, 0, 0, 0, 0, %e A178515 [13] 41835, 258115, 249249, 19305, 0, 0, 0, 0, 0, 0, 0, 0, 0, %e A178515 [14] 113634, 883883, 1201200, 191763, 0, 0, 0, 0, 0, 0, 0, ..., %e A178515 [15] 310572, 2994355, 5519514, 1525095, 0, 0, 0, 0, 0, 0, 0, ..., %e A178515 [16] 853467, 10051860, 24408384, 10667800, 225225, 0, 0, 0, ..., %e A178515 [17] 2356779, 33479460, 104552448, 67581800, 3828825, 0, 0, ..., %e A178515 ... %p A178515 n := 8: with(combinat): P := permute(n): inv := proc (p) local j, q: for j to nops(p) do q[p[j]] := j end do: [seq(q[i], i = 1 .. nops(p))] end proc: nrfp := proc (p) local ct, j: ct := 0: for j to nops(p) do if p[j] = j then ct := ct+1 else end if end do: ct end proc: nrcyc := proc (p) local pc: pc := convert(p, disjcyc): nops(pc)+nrfp(p) end proc: b := proc (p) local c: c := [seq(i+1, i = 1 .. nops(p)-1), 1]: [seq(c[p[j]], j = 1 .. nops(p))] end proc: gen := proc (p) options operator, arrow: (1/2)*nops(p)+1/2-(1/2)*nrcyc(p)-(1/2)*nrcyc(b(inv(p))) end proc; INV := {}: for i to factorial(n) do if inv(P[i]) = P[i] then INV := `union`(INV, {P[i]}) else end if end do: f[n] := sort(add(t^gen(INV[j]), j = 1 .. nops(INV))): seq(coeff(f[n], t, j), j = 0 .. degree(f[n])); # yields the entries of the specified row n %Y A178515 Cf. A177267. %Y A178515 Cf. A000085, A001006. %K A178515 nonn,hard,tabl %O A178515 1,2 %A A178515 _Emeric Deutsch_, May 29 2010 %E A178515 Terms beyond row 7 from _Joerg Arndt_, Nov 01 2012.