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.

Showing 1-3 of 3 results.

A296666 Table read by rows, the even rows of A296664, T(n, k) for n >= 0 and 0 <= k <= 2n.

Original entry on oeis.org

1, 1, 2, 1, 2, 5, 6, 5, 2, 5, 14, 19, 20, 19, 14, 5, 14, 42, 62, 69, 70, 69, 62, 42, 14, 42, 132, 207, 242, 251, 252, 251, 242, 207, 132, 42, 132, 429, 704, 858, 912, 923, 924, 923, 912, 858, 704, 429, 132
Offset: 0

Views

Author

Peter Luschny, Dec 19 2017

Keywords

Comments

Let v be the characteristic function of 1 (A063524) and M(n) for n >= 0 the symmetric Toeplitz matrix generated by the initial segment of v, then row n is the main diagonal of M(2n)^(2n).
Seems to be A050157 + its reflection. - Andrey Zabolotskiy, Dec 19 2017

Examples

			0: [  1]
1: [  1,   2,   1]
2: [  2,   5,   6,   5,   2]
3: [  5,  14,  19,  20,  19,  14,   5]
4: [ 14,  42,  62,  69,  70,  69,  62,  42,  14]
5: [ 42, 132, 207, 242, 251, 252, 251, 242, 207, 132,  42]
6: [132, 429, 704, 858, 912, 923, 924, 923, 912, 858, 704, 429, 132]
		

Crossrefs

Programs

  • Maple
    v := n -> `if`(n=1, 1, 0);
    B := n -> LinearAlgebra:-ToeplitzMatrix([seq(v(j), j=0..n)], symmetric):
    seq(convert(ArrayTools:-Diagonal(B(2*n)^(2*n)), list), n=0..10);
  • Mathematica
    v[n_] := If[n == 1, 1, 0];
    m[n_] := MatrixPower[ToeplitzMatrix[Table[v[k], {k, 0, n}]], n];
    d[n_] := If[n == 0, {1}, Diagonal[m[2 n]]];
    Table[d[n], {n, 0, 6}] // Flatten
  • Sage
    def T(n, k):
        if k > n:
            b = binomial(2*n, k - n - 1)
        else:
            b = binomial(2*n, n + k + 1)
        return binomial(2*n, n) - b
    for n in (0..6):
        print([T(n, k) for k in (0..2*n)])

Formula

T(n, 0) = T(n, 2*n) = A000108(n).
T(n, n) are the central binomial coefficients A000984(n).
T(n, k) = binomial(2*n, n) - binomial(2*n, n+k+1) for k=0..n.
T(n, k) = binomial(2*n, n) - binomial(2*n, k-n-1) for k=n+1..2*n and n>0.

A296662 Table read by rows, the odd rows of A296664, T(n, k) for n >= 0 and 0 <= k <= 2n.

Original entry on oeis.org

1, 2, 3, 2, 5, 9, 10, 9, 5, 14, 28, 34, 35, 34, 28, 14, 42, 90, 117, 125, 126, 125, 117, 90, 42, 132, 297, 407, 451, 461, 462, 461, 451, 407, 297, 132, 429, 1001, 1430, 1638, 1703, 1715, 1716, 1715, 1703, 1638, 1430, 1001, 429
Offset: 0

Views

Author

Peter Luschny, Dec 20 2017

Keywords

Comments

Let v be the characteristic function of 1 (A063524) and M(n) for n >= 0 the symmetric Toeplitz matrix generated by the initial segment of v, then row n is the diagonal next to the main diagonal of M(2n+1)^(2n+1).

Examples

			The triangle starts:
0: [  1]
1: [  2,   3,   2]
2: [  5,   9,  10,   9,   5]
3: [ 14,  28,  34,  35,  34,  28,  14]
4: [ 42,  90, 117, 125, 126, 125, 117,  90,  42]
5: [132, 297, 407, 451, 461, 462, 461, 451, 407, 297, 132]
		

Crossrefs

Programs

  • Maple
    v := n -> `if`(n=1, 1, 0):
    B := n -> LinearAlgebra:-ToeplitzMatrix([seq(v(j),j=0..n)], symmetric):
    seq(convert(ArrayTools:-Diagonal(B(2*n+1)^(2*n+1), 1),list), n=0..6);
  • Mathematica
    v[n_] := If[n == 1, 1, 0];
    m[n_] := MatrixPower[ToeplitzMatrix[Table[v[k], {k, 0, n}]], n];
    d[n_] := Diagonal[m[2 n + 1], 1];
    Table[d[n], {n, 0, 6}] // Flatten
  • Sage
    def T(n, k):
        if k > n:
            b = binomial(2*n+1, k - n - 1)
        else:
            b = binomial(2*n+1, n - k - 1)
        return binomial(2*n+1, n+1) - b
    for n in (0..6):
        print([T(n, k) for k in (0..2*n)])

Formula

T(n, n) = A001700(n).
T(n, 0) = T(n, 2*n) = A000108(n+1).
T(n, k) = binomial(2*n+1, n+1) - binomial(2*n+1, n-k-1) for k=0..n.
T(n, k) = binomial(2*n+1, n+1) - binomial(2*n+1, k-n-1) for k=n+1..2*n and n>0.

A296663 Row sums of A296664.

Original entry on oeis.org

1, 1, 4, 7, 20, 38, 96, 187, 444, 874, 2000, 3958, 8840, 17548, 38528, 76627, 166124, 330818, 710256, 1415650, 3016056, 6015316, 12736064, 25413342, 53530840, 106853668, 224107936, 447472972, 935062544, 1867450648, 3890018816, 7770342787, 16141765964
Offset: 0

Views

Author

Peter Luschny, Dec 19 2017

Keywords

Crossrefs

Cf. A296664, A000531 (bisection).

Programs

  • Maple
    a := proc(n) if n mod 2 = 0 then ((n+2)/2)*GAMMA((n+1)/2)/GAMMA((n+2)/2)
    else GAMMA((n+4)/2)/GAMMA((n+3)/2) fi; 2^n*(2*%/sqrt(Pi)-1) end:
    seq(a(n), n=0..32);
  • Mathematica
    a[n_] := 2^n ((n + 2 + Mod[n, 2]) Binomial[(n - 1 + 3 Mod[n, 2])/2, -1/2] - 1);
    Table[a[n], {n, 0, 32}]

Formula

a(n) = 2^n*(2*h(n)/sqrt(Pi) - 1) where h(n) = (n/2+1)*Gamma((n+1)/2)/Gamma((n+2)/2) if n mod 2 = 0 else Gamma((n+4)/2)/Gamma((n+3)/2).
a(n) = 2^n*((n+2+(n mod 2))*binomial((n-1+3*(n mod 2))/2, -1/2) - 1).
-(n+1)*(n^2-2*n-1) *a(n) +2*(n-2)*(n^2+n+1) *a(n-1) +4*(n-1)*(n^2-n-5) *a(n-2) -8*(n-2)*(n^2-2) *a(n-3)=0. - R. J. Mathar, Jan 03 2018
Showing 1-3 of 3 results.