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-2 of 2 results.

A035317 Pascal-like triangle associated with A000670.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 4, 2, 1, 4, 7, 6, 3, 1, 5, 11, 13, 9, 3, 1, 6, 16, 24, 22, 12, 4, 1, 7, 22, 40, 46, 34, 16, 4, 1, 8, 29, 62, 86, 80, 50, 20, 5, 1, 9, 37, 91, 148, 166, 130, 70, 25, 5, 1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6, 1, 11, 56, 174, 367, 553, 610, 496, 295, 125
Offset: 0

Views

Author

Keywords

Comments

From Johannes W. Meijer, Jul 20 2011: (Start)
The triangle sums, see A180662 for their definitions, link this "Races with Ties" triangle with several sequences, see the crossrefs. Observe that the Kn4 sums lead to the golden rectangle numbers A001654 and that the Fi1 and Fi2 sums lead to the Jacobsthal sequence A001045.
The series expansion of G(x, y) = 1/((y*x-1)*(y*x+1)*((y+1)*x-1)) as function of x leads to this sequence, see the second Maple program. (End)
T(2n,k) = the number of hatted frog arrangements with k frogs on the 2xn grid. See the linked paper "Frogs, hats and common subsequences". - Chris Cox, Apr 12 2024

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,  2;
  1,  3,  4,   2;
  1,  4,  7,   6,   3;
  1,  5, 11,  13,   9,   3;
  1,  6, 16,  24,  22,  12,   4;
  1,  7, 22,  40,  46,  34,  16,   4;
  1,  8, 29,  62,  86,  80,  50,  20,  5;
  1,  9, 37,  91, 148, 166, 130,  70, 25,  5;
  1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6;
  ...
		

Crossrefs

Row sums are A000975, diagonal sums are A080239.
Central terms are A014300.
Similar to the triangles A059259, A080242, A108561, A112555.
Cf. A059260.
Triangle sums (see the comments): A000975 (Row1), A059841 (Row2), A080239 (Kn11), A052952 (Kn21), A129696 (Kn22), A001906 (Kn3), A001654 (Kn4), A001045 (Fi1, Fi2), A023435 (Ca2), Gi2 (A193146), A190525 (Ze2), A193147 (Ze3), A181532 (Ze4). - Johannes W. Meijer, Jul 20 2011
Cf. A181971.

Programs

  • Haskell
    a035317 n k = a035317_tabl !! n !! k
    a035317_row n = a035317_tabl !! n
    a035317_tabl = map snd $ iterate f (0, [1]) where
       f (i, row) = (1 - i, zipWith (+) ([0] ++ row) (row ++ [i]))
    -- Reinhard Zumkeller, Jul 09 2012
    
  • Maple
    A035317 := proc(n,k): add((-1)^(i+k) * binomial(i+n-k+1, i), i=0..k) end: seq(seq(A035317(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Jul 20 2011
    A035317 := proc(n,k): coeff(coeftayl(1/((y*x-1)*(y*x+1)*((y+1)*x-1)), x=0, n), y, k) end: seq(seq(A035317(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Jul 20 2011
  • Mathematica
    t[n_, k_] := (-1)^k*(((-1)^k*(n+2)!*Hypergeometric2F1[1, n+3, k+2, -1])/((k+1)!*(n-k+1)!) + 2^(k-n-2)); Flatten[ Table[ t[n, k], {n, 0, 11}, {k, 0, n}]] (* Jean-François Alcover, Dec 14 2011, after Johannes W. Meijer *)
  • PARI
    {T(n,k)=if(n==k,(n+2)\2,if(k==0,1,if(n>k,T(n-1,k-1)+T(n-1,k))))}
    for(n=0,12,for(k=0,n,print1(T(n,k),","));print("")) \\ Paul D. Hanna, Jul 18 2012
    
  • Sage
    def A035317_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return -prec(n-1,k-1)-sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^k*prec(n+2, k) for k in (1..n)]
    for n in (1..11): print(A035317_row(n)) # Peter Luschny, Mar 16 2016

Formula

T(n,k) = Sum_{j=0..floor(n/2)} binomial(n-2j, k-2j). - Paul Barry, Feb 11 2003
From Johannes W. Meijer, Jul 20 2011: (Start)
T(n, k) = Sum_{i=0..k}((-1)^(i+k) * binomial(i+n-k+1,i)). (Mendelson)
T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = 1 and T(n, n) = floor(n/2) + 1. (Mendelson)
Sum_{k = 0..n}((-1)^k * (n-k+1)^n * T(n, k)) = A000670(n). (Mendelson)
T(n, n-k) = A128176(n, k); T(n+k, n-k) = A158909(n, k); T(2*n-k, k) = A092879(n, k). (End)
T(2*n+1,n) = A014301(n+1); T(2*n+1,n+1) = A026641(n+1). - Reinhard Zumkeller, Jul 19 2012

Extensions

More terms from James Sellers

A158909 Riordan array (1/((1-x)(1-x^2)), x/(1-x)^2). Triangle read by rows, T(n,k) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 2, 7, 5, 1, 3, 13, 16, 7, 1, 3, 22, 40, 29, 9, 1, 4, 34, 86, 91, 46, 11, 1, 4, 50, 166, 239, 174, 67, 13, 1, 5, 70, 296, 553, 541, 297, 92, 15, 1, 5, 95, 496, 1163, 1461, 1068, 468, 121, 17, 1, 6, 125, 791, 2269, 3544, 3300, 1912, 695, 154, 19, 1
Offset: 0

Views

Author

Paul Barry, Mar 30 2009

Keywords

Comments

Diagonal sums are the Jacobsthal numbers A001045.
Transforms r^n into the symmetric third-order sequence with g.f. 1/(1-(r+1)x-(r+1)x^2+x^3), see the formulas.
From Wolfdieter Lang, Oct 22 2019: (Start)
The signed triangle t(n, k) = (-1)^(n-k)*T(n, k) appears in the expansion [n+2, 2]q / q^n = Sum{k=0} t(n, k)*y^(2*k), with y = q^(1/2) + q^(-1/2), where [n+2, 2]_q are q-binomial coefficients (see A008967, but with a different offset). The formula is [n+2, 2]_q / q^n = S(n+1, y)*S(n, y)/y with Chebyshev S polynomials (A049310). This is a polynomial in y^2 but not in q after replacement of the given y = y(q).
The A-sequence for this Riordan triangle is A(n) = (-1)^n*A115141(n) with o.g.f A(x) = 1 + x*(1 + c(-x)), with c(x) generating A000108 (Catalan).
The Z-sequence is z(n) = (-1)^(n+1)*A071724(n), for n >= 1 and z(0) = 1. The o.g.f. is Z(x) = 1 + x*c(-x)^3. See A071724 for a link on A- and Z-sequences, and their use for the recurrence. (End)
T(n,k) is the number of tilings of a (2*n+1)-board (a 1 X (2*n+1) rectangular board) using 2*k+1 squares and 2*(n-k) (1,1)-fences. A (1,1)-fence is a tile composed of two squares separated by a gap of width 1. - Michael A. Allen, Mar 20 2021

Examples

			From _Wolfdieter Lang_, Oct 22 2019: (Start)
The triangle T(n, k) begins:
  n\k  0   1   2    3    4    5    6   7   8  9 10 ...
  ----------------------------------------------------
  0:   1
  1:   1   1
  2:   2   3   1
  3:   2   7   5    1
  4:   3  13  16    7    1
  5:   3  22  40   29    9    1
  6:   4  34  86   91   46   11    1
  7:   4  50 166  239  174   67   13   1
  8:   5  70 296  553  541  297   92  15   1
  9:   5  95 496 1163 1461 1068  468 121  17  1
  10:  6 125 791 2269 3544 3300 1912 695 154 19  1
  ...
----------------------------------------------------------------------------
Recurrence: T(5, 2) = 16 + 13 + 5 + 7 - 1 = 40, and T(5, 0) = 3 + 2 - 2 = 3. [using _Philippe Deléham_'s Nov 12 2013 recurrence]
Recurrence from A-sequence [1, 2, -1, 2, -5, ...]: T(5, 2) = 1*13 + 2*16 - 1*7 + 2*1 = 40.
Recurrence from Z-sequence [1, 1, -3, 9, -28, ...]: T(5, 0) = 1*3 + 1*13 - 3*16 + 9*7 - 28*1 = 3. (End)
		

Crossrefs

Programs

  • Magma
    [(&+[(-1)^(j+n-k)*Binomial(2*k+j+1, j): j in [0..n-k]]): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 18 2021
  • Maple
    T := (n,k) -> binomial(k+n+2, n-k+1)*hypergeom([1, k+n+3], [n-k+2], -1) + (-1)^(n-k)/4^(k+1):
    seq(seq(simplify(T(n,k)), k=0..n), n=0..9); # Peter Luschny, Oct 31 2019
  • Mathematica
    Table[Sum[(-1)^(j+n-k)*Binomial[j+2*k+1, j], {j,0,n-k}], {n,0,12}, {k,0,n}] // Flatten (* G. C. Greubel, Mar 18 2021 *)
  • Sage
    flatten([[sum((-1)^(j+n-k)*binomial(j+2*k+1, j) for j in (0..n-k)) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 18 2021
    

Formula

Sum_{k=0..n} T(n,k) = Fibonacci(n+1)*Fibonacci(n+2) = A001654(n+1).
From Johannes W. Meijer, Jul 20 2011: (Start)
T(n, k) = Sum_{i=0..n-k} (-1)^(i+n-k) * binomial(i+2*k+1, i).
T(n, k) = A035317(n+k, n-k) = A092879(n, n-k).
Sum_{k=0..n} T(n, k)*r^k = coeftayl(1/(1-(r+1)*x-(r+1)*x^2+x^3), x=0, n). [Barry] (End)
T(n, k) = T(n-1, k) + T(n-1, k-1) + T(n-2, k) + T(n-2, k-1) - T(n-3, k), T(0, 0) = 1, T(n, k) = 0 if k<0 or if k>n. - Philippe Deléham, Nov 12 2013
From Wolfdieter Lang, Oct 22 2019: (Start)
O.g.f. for the row polynomials (that is for the triangle): G(z, x) = 1/((1 + z)*(1 - (x + 2)*z + z^2)), and
O.g.f. for column k: x^k/((1+x)*(1-x)^(2*(k+1))) (Riordan property). (End)
T(n, k) = binomial(k + n + 2, n - k + 1)*hypergeom([1, k + n + 3], [n - k + 2], -1) + (-1)^(n - k)/4^(k + 1). - Peter Luschny, Oct 31 2019
From Michael A. Allen, Mar 20 2021: (Start)
T(n,k) = A335964(2*n+1,n-k).
T(n,k) = T(n-2,k) + binomial(n+k,2*k). (End)
Showing 1-2 of 2 results.