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.

A296769 Row sums of A296662.

Original entry on oeis.org

1, 7, 38, 187, 874, 3958, 17548, 76627, 330818, 1415650, 6015316, 25413342, 106853668, 447472972, 1867450648, 7770342787, 32248174258, 133530264682, 551793690628, 2276098026922, 9373521044908, 38546133661492, 158301250009768, 649328801880622
Offset: 0

Views

Author

Peter Luschny, Dec 20 2017

Keywords

Crossrefs

Cf. A000531, A296662, bisection of A296663.

Programs

  • Maple
    a := n -> 2^(1 + 2*n)*((2*GAMMA(5/2 + n))/(sqrt(Pi)*GAMMA(2 + n)) - 1):
    seq(a(n), n=0..23);
    # alternative
    A296769 := proc(n)
        2^(2*n)*(doublefactorial(2*n+3)/(1+n)/doublefactorial(2*n)-2) ;
    end proc:
    seq(A296769(n),n=0..10) ; # R. J. Mathar, Jan 03 2018

Formula

a(n) = 2^(1 + 2*n)*((2*Gamma(5/2 + n))/(sqrt(Pi)*Gamma(2 + n)) - 1).
a(n) ~ 4^(n+1)*(sqrt(n/Pi) - 1/2).
a(n) = A000531(n+1). - R. J. Mathar, Jan 03 2018
a(n) = A033876(n)-2^(2*n+1). - R. J. Mathar, Jan 03 2018

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.

A296664 Table read by rows, diagonals of powers of Toeplitz matrices generated by the characteristic function of 1, T(n, k) for n >= 0 and 0 <= k <= 2*floor(n/2).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 2, 2, 5, 6, 5, 2, 5, 9, 10, 9, 5, 5, 14, 19, 20, 19, 14, 5, 14, 28, 34, 35, 34, 28, 14, 14, 42, 62, 69, 70, 69, 62, 42, 14, 42, 90, 117, 125, 126, 125, 117, 90, 42, 42, 132, 207, 242, 251, 252, 251, 242, 207, 132, 42
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(n)^n if n is even or the diagonal next to the main diagonal if n is odd. Note that the antidiagonals of M(n)^n are the rows of Pascal's triangle A007318.

Examples

			The first few matrices M(n)^n are:
n=0   n=1     n=2       n=3         n=4
|1|  |0 1|  |1 0 1|  |0 2 0 1|  |2 0 3 0 1|
     |1 0|  |0 2 0|  |2 0 3 0|  |0 5 0 4 0|
            |1 0 1|  |0 3 0 2|  |3 0 6 0 3|
                     |1 0 2 0|  |0 4 0 5 0|
                                |1 0 3 0 2|
The triangle starts:
0: [ 1]
1: [ 1]
2: [ 1,  2,   1]
3: [ 2,  3,   2]
4: [ 2,  5,   6,   5,   2]
5: [ 5,  9,  10,   9,   5]
6: [ 5, 14,  19,  20,  19,  14,  5]
7: [14, 28,  34,  35,  34,  28,  14]
8: [14, 42,  62,  69,  70,  69,  62, 42, 14]
9: [42, 90, 117, 125, 126, 125, 117, 90, 42]
		

Crossrefs

Cf. A000108, A001405, A208355, A296663 (row sums), A296662 (odd rows), A296666 (even rows).

Programs

  • Maple
    v := n -> `if`(n=1, 1, 0):
    M := n -> LinearAlgebra:-ToeplitzMatrix([seq(v(j), j=0..n)], symmetric):
    seq(convert(ArrayTools:-Diagonal(M(n)^n, n mod 2), 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[n], Mod[n, 2]]];
    Table[d[n], {n, 0, 10}] // Flatten
  • Sage
    def T(n, k):
        h, e = n//2, n%2 == 0
        a = binomial(n, h) if e else binomial(2*h+1, h+1)
        if k > h:
            b = binomial(n, k-h-1) if e else binomial(2*h+1, k-h-1)
        else:
            b = binomial(n, h+k+1) if e else binomial(2*h+1, h-k-1)
        return a - b
    for n in (0..9): print([T(n, k) for k in (0..2*(n//2))])

Formula

T(n, 0) = T(n, 2*floor(n/2)) = A208355(n) = A000108(floor((n+1)/2)).
T(n, floor(n/2)) = A001405(n).
Further formulas can be found in A296662 and A296666 for the cases n odd and n even.
Showing 1-3 of 3 results.