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.

A244312 Triangle read by rows: T(n,k) is the number of single loop solutions formed by n proper arches (connecting odd vertices to even vertices in the range 1 to 2n) above the x axis, k of which connect an odd vertex to a higher even vertex, with a rainbow of n arches below the x axis.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 0, 2, 4, 0, 0, 4, 16, 4, 0, 0, 4, 48, 60, 8, 0, 0, 8, 160, 384, 160, 8, 0, 0, 8, 368, 1952, 2176, 520, 16, 0, 0, 16, 1152, 9648, 18688, 9648, 1152, 16, 0, 0, 16, 2432, 37008, 132640, 141680, 45504, 3568, 32, 0
Offset: 1

Views

Author

Roger Ford, Jul 02 2014

Keywords

Comments

Sum of row n = (n-1)!.

Examples

			Triangle T(n,k) begins:
n\k  1     2     3     4     5     6     7     8
1    1
2    0     1
3    0     2     0
4    0     2     4     0
5    0     4    16     4     0
6    0     4    48    60     8     0
7    0     8   160   384   160     8    0
8    0     8   368  1952  2176   520   16    0
T(4,3)=4 [top 14,23,56,78; bottom 18,27,36,45] [top 16,25,34,78; bottom 18,27,36,45] [top 12,34,58,67; bottom 18,27,36,45] [top 12,38,47,56; bottom 18,27,36,45]
		

Programs

  • Mathematica
    T[1,1]:= 1; T[n_,0]:= 0; T[n_, n_+1] := 0; T[n_,k_]:= If[k == n+1, 0, (k + Floor[(-1)^(n-1)/2])*T[n-1, k] + (n-k -Floor[(-1)^(n-1)/2]) T[n-1, k - 1]]; Table[T[n, k], {n, 1, 15}, {k, 1, n}]//Flatten (* G. C. Greubel, Oct 10 2018 *)
  • PARI
    T(n,k)=if(n==1 && k==1, 1, if(k==0, 0, if( k==n+1, 0, (k+ floor((-1)^(n-1)/2))*T(n-1,k) + (n-k- floor((-1)^(n-1)/2))*T(n-1,k-1))));
    for(n=1, 15, for(k=1,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Oct 10 2018

Formula

T(n,k)= (k+ floor((-1)^(n-1)/2))*T(n-1,k) + (n-k- floor((-1)^(n-1)/2))*T(n-1,k-1), n=>2, 1<=k<=n, T(1,1)=1, T(n,0)=0, T(n,n+1)=0.