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.

A108723 Triangle read by rows: T(n,k) is number of permutations of [n] with ascending runs consisting of consecutive integers and having k fixed points.

This page as a plain text file.
%I A108723 #7 Nov 14 2024 08:20:19
%S A108723 1,0,1,1,0,1,2,1,0,1,6,0,1,0,1,10,4,0,1,0,1,26,0,4,0,1,0,1,42,16,0,4,
%T A108723 0,1,0,1,106,0,16,0,4,0,1,0,1,170,64,0,16,0,4,0,1,0,1,426,0,64,0,16,0,
%U A108723 4,0,1,0,1,682,256,0,64,0,16,0,4,0,1,0,1,1706,0,256,0,64,0,16,0,4,0,1,0,1
%N A108723 Triangle read by rows: T(n,k) is number of permutations of [n] with ascending runs consisting of consecutive integers and having k fixed points.
%C A108723 T(n,0)=A061547(n). Sum of row n is 2^(n-1) (n>=1).
%F A108723 T(n, 0)=(3/8)2^n + (1/24)(-2)^n - 2/3; T(n, n)=1; T(n, k)=2^(n-k-2) if k>0 and n-k is even; T(n, k)=0 if k>0 and n-k is odd or if k>n.
%e A108723 T(3,0)=2 because we have (23)(1) and (3)(12); T(3,1)=1 because we have (3)(2)(1); T(3,3)=1 because we have (123) (the ascending runs are shown between parentheses).
%e A108723 Triangle begins:
%e A108723 1;
%e A108723 0,1;
%e A108723 1,0,1;
%e A108723 2,1,0,1;
%e A108723 6,0,1,0,1;
%e A108723 10,4,0,1,0,1;
%p A108723 T:=proc(n,k) if k=n then 1 elif k>n then 0 elif k=0 then 3*2^n/8+(-2)^n/24-2/3 elif k>0 and n-k mod 2 = 0 then 2^(n-k-2) else 0 fi end: for n from 0 to 13 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
%t A108723 T[n_, k_] := Which[k == n, 1, k > n, 0, k == 0, 3*2^n/8 + (-2)^n/24 - 2/3, k > 0 && EvenQ[n-k], 2^(n-k-2), True, 0];
%t A108723 Table[T[n, k], {n, 0, 13}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Nov 14 2024, after Maple program *)
%Y A108723 Cf. A061547.
%K A108723 nonn,tabl
%O A108723 0,7
%A A108723 _Emeric Deutsch_, Jun 21 2005