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.

A193776 Number of signed permutations of length n invariant under the reverse complement and avoiding (-2, -1), (-2, 1), (2, -1).

Original entry on oeis.org

1, 2, 3, 5, 12, 17, 65, 80, 473, 527, 4444, 4679, 51391, 52628, 703659, 711449, 11098896, 11156477, 197809793, 198299024, 3927270089, 3931960343, 85908742132, 85958728847, 2052375195679, 2052960568556, 53160174898371, 53167638586121, 1483752628890840, 1483855482962885, 44391655829672177
Offset: 0

Views

Author

Andy Hardt, Aug 04 2011

Keywords

Examples

			For n = 2, the permutations are (1, 2), (2, 1), (-1, -2), (-2, -1).
		

Programs

  • Mathematica
    a[n_] := a[n] = If[EvenQ[n],
       Sum[a[2j]*(n/2 - j - 1)!, {j, 0, n/2 - 1}] + 2^(n/2)*(n/2)!,
       Sum[a[2j+1]*((1/2)*(n - 2j - 3))!, {j, 0, (n - 3)/2}] +
          (2^((n - 1)/2) + 1)*((n - 1)/2)!];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Apr 10 2024 *)

Formula

a(2k) = 2^k k! + \sum_{j=0}^{k-1}(k-j-1)! a(2j)
a(2k+1) = (2^k + 1)k! + \sum_{j=0}^{k-1}(k-j-1)! a(2j+1)