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.

A335872 Number T(n,k) of permutations of [n] having k points that are fixed or reflected; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

This page as a plain text file.
%I A335872 #18 Feb 13 2021 04:56:51
%S A335872 1,0,1,0,0,2,0,4,0,2,4,0,16,0,4,16,36,32,32,0,4,80,192,216,128,96,0,8,
%T A335872 672,1472,1440,984,320,144,0,8,4752,10752,11776,7680,3936,1024,384,0,
%U A335872 16,48768,103568,104448,65920,28544,9312,1792,512,0,16
%N A335872 Number T(n,k) of permutations of [n] having k points that are fixed or reflected; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
%C A335872 A permutation p of [n] has fixed point j if p(j) = j, it has reflected point j if p(n+1-j) = j.  A point can be fixed and reflected at the same time.
%H A335872 Alois P. Heinz, <a href="/A335872/b335872.txt">Rows n = 0..22, flattened</a>
%H A335872 T. Simpson, <a href="/A007016/a007016.pdf">Permutations with unique fixed and reflected points</a>, Preprint. (Annotated scanned copy)
%H A335872 Wikipedia, <a href="https://en.wikipedia.org/wiki/Permutation">Permutation</a>
%F A335872 Sum_{k=1..n} k * T(n,k) = A335873(n).
%F A335872 T(n,n-2) = floor((n-1)^2/2) * 2^floor(n/2).
%e A335872       1;
%e A335872       0,      1;
%e A335872       0,      0,      2;
%e A335872       0,      4,      0,     2;
%e A335872       4,      0,     16,     0,     4;
%e A335872      16,     36,     32,    32,     0,    4;
%e A335872      80,    192,    216,   128,    96,    0,    8;
%e A335872     672,   1472,   1440,   984,   320,  144,    0,   8;
%e A335872    4752,  10752,  11776,  7680,  3936, 1024,  384,   0, 16;
%e A335872   48768, 103568, 104448, 65920, 28544, 9312, 1792, 512,  0, 16;
%e A335872   ...
%p A335872 b:= proc(s, i, t) option remember; (n-> `if`(n=0, x^t, add(
%p A335872       b(s minus {j}, i+1, t+`if`(j in {i, n}, 1, 0)), j=s)))(nops(s))
%p A335872     end:
%p A335872 T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b({$1..n}, 1, 0)):
%p A335872 seq(T(n), n=0..10);
%t A335872 b[s_, i_, t_] := b[s, i, t] = With[{n = Length[s]}, If[n == 0, x^t, Sum[b[s ~Complement~ {j}, i+1, t + If[j == i || j == n, 1, 0]], {j, s}]]];
%t A335872 T[n_] := CoefficientList[b[Range[n], 1, 0], x];
%t A335872 T /@ Range[0, 10] // Flatten (* _Jean-François Alcover_, Feb 13 2021, after _Alois P. Heinz_ *)
%Y A335872 Column k=0 gives A003471.
%Y A335872 Main diagonal gives A016116.
%Y A335872 Row sums give A000142.
%Y A335872 Cf. A008290, A335873.
%K A335872 nonn,tabl
%O A335872 0,6
%A A335872 _Alois P. Heinz_, Jun 28 2020