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.

Previous Showing 21-25 of 25 results.

A110098 Triangle read by rows: T(n,k) (0 <= k <= n) is the number of Delannoy paths of length n, having k return steps to the line y = x from the line y = x+1 (i.e., E steps from the line y=x+1 to the line y = x).

Original entry on oeis.org

1, 2, 1, 6, 6, 1, 22, 30, 10, 1, 90, 146, 70, 14, 1, 394, 714, 430, 126, 18, 1, 1806, 3534, 2490, 938, 198, 22, 1, 8558, 17718, 14002, 6314, 1734, 286, 26, 1, 41586, 89898, 77550, 40054, 13338, 2882, 390, 30, 1, 206098, 461010, 426150, 244790, 94554, 24970, 4446, 510, 34, 1
Offset: 0

Views

Author

Emeric Deutsch, Jul 11 2005

Keywords

Comments

A Delannoy path of length n is a path from (0,0) to (n,n), consisting of steps E=(1,0), N=(0,1) and D=(1,1).
The row sums are the central Delannoy numbers (A001850).
Column 0 yields the large Schroeder numbers (A006318).
Column 1 yields A006320.
Column k has g.f. z^k*R^(2*k+1), where R = 1 + z*R + z*R^2 is the g.f. of the large Schroeder numbers (A006318).

Examples

			T(2, 1) = 6 because we have DN(E), N(E)D, N(E)EN, ND(E), NNE(E) and ENN(E) (the return E steps are shown between parentheses).
Triangle begins:
   1;
   2,   1;
   6,   6,   1;
  22,  30,  10,   1;
  90, 146,  70,  14,   1;
		

Crossrefs

Programs

  • Maple
    T := proc(n, k) if k=n then 1 else ((2*k+1)/(n-k))*sum(binomial(n-k,j)*binomial(n+k+j,n-k-1),j=0..n-k) fi end: for n from 0 to 10 do seq(T(n, k), k=0..n) od; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := If[k == n, 1, ((2*k+1)/(n-k))*Sum[Binomial[n-k, j]*Binomial[n+k+j, n-k-1], {j, 0, n-k}]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 21 2024, after Maple program *)

Formula

T(n,k) = ((2*k+1)/(n-k))*Sum_{j=0..n-k} binomial(n-k, j)*binomial(n+k+j, n-k-1) for k < n;
T(n,n) = 1;
T(n,k) = 0 for k > n.
G.f.: R/(1 - t*z*R^2), where R = 1 + z*R + z*R^2 is the g.f. of the large Schroeder numbers (A006318).
Sum_{k=0..n} k*T(n,k) = A110099(n).
T(n,k) = A033877(n-k+1, n+k+1). - Johannes W. Meijer, Sep 05 2013
It appears that this triangle equals M * N^(-1), where M is the lower triangular array A063007 and N = ( (-1)^(n+k)* binomial(n, k)*binomial(n+k, k) )n,k >= 0 is a signed version of A063007. - Peter Bala, Oct 07 2024

A106579 Triangular array associated with Schroeder numbers: T(0,0) = 1, T(n,0) = 0 for n > 0; T(n,k) = 0 if k < n; T(n,k) = T(n,k-1) + T(n-1,k-1) + T(n-1,k).

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 4, 6, 0, 1, 6, 16, 22, 0, 1, 8, 30, 68, 90, 0, 1, 10, 48, 146, 304, 394, 0, 1, 12, 70, 264, 714, 1412, 1806, 0, 1, 14, 96, 430, 1408, 3534, 6752, 8558, 0, 1, 16, 126, 652, 2490, 7432, 17718, 33028, 41586, 0, 1, 18, 160, 938, 4080, 14002, 39152, 89898, 164512, 206098
Offset: 0

Views

Author

N. J. A. Sloane, May 30 2005

Keywords

Examples

			Triangle starts
  1;
  0,    1;
  0,    1,    2;
  0,    1,    4,    6;
  0,    1,    6,   16,   22;
  0,    1,    8,   30,   68,   90;
  0,    1,   10,   48,  146,  304,  394;
  0,    1,   12,   70,  264,  714, 1412, 1806;
  ...
		

Crossrefs

Essentially the same as A033877 except with a leading column 1, 0, 0, 0, ...
Last diagonal: A006318 or A103137.
Row sums give A001003.
See A033877 for more comments and references.

Programs

  • Haskell
    a106579 n k = a106579_tabl !! n !! k
    a106579_row n = a106579_tabl !! n
    a106579_tabl = [1] : iterate
       (\row -> scanl1 (+) $ zipWith (+) ([0] ++ row) (row ++ [0])) [0,1]
    -- Reinhard Zumkeller, Apr 17 2013
    
  • Mathematica
    T[n_, k_]:= T[n, k]= Which[n==k==0, 1, n==0, 0, k==0, 0, k>n, 0, True, T[n, k-1] + T[n-1, k-1] + T[n-1, k]]; Table[T[n, k], {n,0,11}, {k,0,n}]//Flatten (* Michael De Vlieger, Nov 05 2017 *)
  • Sage
    def A106579_row(n):
        if n==0: return [1]
        @cached_function
        def prec(n, k):
            if k==n: return -1
            if k==0: return 0
            return prec(n-1,k-1)-2*sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^k*prec(n, n-k+1) for k in (0..n)]
    for n in (0..10): print(A106579_row(n)) # Peter Luschny, Mar 16 2016

Formula

G.f.: Sum T(n, k)*x^n*y^k = 1 + y*(1 - x*y - (x^2*y^2 - 6*x*y + 1)^(1/2))/(2*y + x*y - 1 + (x^2*y^2 - 6*x*y + 1)^(1/2)).

A122538 Riordan array (1, x*f(x)) where f(x)is the g.f. of A006318.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 6, 4, 1, 0, 22, 16, 6, 1, 0, 90, 68, 30, 8, 1, 0, 394, 304, 146, 48, 10, 1, 0, 1806, 1412, 714, 264, 70, 12, 1, 0, 8558, 6752, 3534, 1408, 430, 96, 14, 1, 0, 41586, 33028, 17718, 7432, 2490, 652, 126, 16, 1, 0, 206098, 164512, 89898, 39152, 14002, 4080, 938, 160, 18, 1
Offset: 0

Views

Author

Philippe Deléham, Sep 18 2006

Keywords

Comments

Triangle T(n,k), 0<=k<=n, read by rows, given by [0, 2, 1, 2, 1, 2, 1, ...] DELTA [1, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938 . Inverse is Riordan array (1, x*(1-x)/(1+x)).
T(n, r) gives the number of [0,r]-covering hierarchies with n segments terminating at r (see Kreweras work). - Michel Marcus, Nov 22 2014

Examples

			Triangle begins:
  1;
  0,    1:
  0,    2,    1;
  0,    6,    4,    1;
  0,   22,   16,    6,    1;
  0,   90,   68,   30,    8,   1;
  0,  394,  304,  146,   48,  10,  1;
  0, 1806, 1412,  714,  264,  70, 12,  1;
  0, 8558, 6752, 3534, 1408, 430, 96, 14, 1;
Production matrix is:
  0...1
  0...2...1
  0...2...2...1
  0...2...2...2...1
  0...2...2...2...2...1
  0...2...2...2...2...2...1
  0...2...2...2...2...2...2...1
  0...2...2...2...2...2...2...2...1
  0...2...2...2...2...2...2...2...2...1
  ... - _Philippe Deléham_, Feb 09 2014
		

Crossrefs

Another version : A080247, A080245, A033877.
Diagonals: A000012, A005843, A054000.
Sums include: A001003 (row and alternating sign), A006603 (diagonal).
Cf. A103885.

Programs

  • Magma
    function T(n,k) // T = A122538
      if k eq 0 then return 0^n;
      elif k eq n then return 1;
      else return T(n-1,k-1) + T(n-1,k) + T(n,k+1);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 27 2024
  • Mathematica
    T[n_, n_]= 1; T[, 0]= 0; T[n, k_]:= T[n, k]= T[n-1, k-1] + T[n-1, k] + T[n, k+1];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* Jean-François Alcover, Jun 13 2019 *)
  • Sage
    def A122538_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return prec(n-1,k-1)-2*sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^(n-k)*prec(n, k) for k in (0..n)]
    for n in (0..12): print(A122538_row(n)) # Peter Luschny, Mar 16 2016
    

Formula

T(n,k) = T(n-1,k-1) + T(n-1,k) + T(n,k+1) if k > 0, with T(n, 0) = 0^n, and T(n, n) = 1.
Sum_{k=0..n} T(n, k) = A001003(n).
From G. C. Greubel, Oct 27 2024: (Start)
T(2*n, n) = A103885(n).
Sum_{k=0..n} (-1)^k*T(n, k) = -A001003(n-1).
Sum_{k=0..floor(n/2)} T(n-k, k) = [n=0] + 0*[n=1] + A006603(n-2)*[n>1]. (End)

A227506 Schroeder triangle sums: a(2*n-1) = A010683(2*n-2) and a(2*n) = A010683(2*n-1) - A001003(2*n-1).

Original entry on oeis.org

1, 1, 7, 17, 121, 353, 2591, 8257, 61921, 207905, 1582791, 5501073, 42344121, 150827073, 1170747519, 4247388417, 33186295681, 122125206977, 959260792775, 3570473750929, 28167068630713, 105820555054241, 837838806587167, 3172136074486337
Offset: 1

Views

Author

Johannes W. Meijer, Jul 15 2013

Keywords

Comments

The terms of this sequence equal the Fi1 sums, see A180662, of the Schroeder triangle A033877 (with offset 1 and n for columns and k for rows).

Crossrefs

Programs

  • Maple
    A227506 := proc(n) local k, T; T := proc(n, k) option remember; if n=1 then return(1) fi; if kA227506(n), n = 1..24); # Peter Luschny, Jul 17 2013
    A227506 := proc(n): if type(n, odd) then A010683(n-1) else A010683(n-1) - A001003(n-1) fi: end: A010683 := proc(n): if n = 0 then 1 else (2/n)*add(binomial(n, k)* binomial(n+k+1, k-1), k=1..n) fi: end: A001003 := proc(n): if n = 0 then 1 else add(binomial(n, j)*binomial(n+j, n-1), j=0..n)/(2*n) fi: end: seq(A227506(n), n=1..24);
  • Mathematica
    T[n_, k_] := T[n, k] = Which[n == 1, 1, k < n, 0, True, T[n, k - 1] + T[n - 1, k - 1] + T[n - 1, k]];
    a[n_] := Sum[T[2 k - 1, n], {k, 1, (n + 1)/2}];
    Array[a, 24] (* Jean-François Alcover, Jul 11 2019, from Sage *)
  • Sage
    def A227506(n):
        @CachedFunction
        def T(n, k):
            if n==1: return 1
            if k A227506(n) for n in (1..24)]  # Peter Luschny, Jul 16 2013

Formula

a(n) = Sum_{k=1..floor((n+1)/2)} A033877(2*k-1,n).
a(2*n-1) = A010683(2*n-2) and a(2*n) = A010683(2*n-1) - A001003(2*n-1).
G.f.: (1-4*x+x^2 - sqrt(1-6*x+x^2) + x*sqrt(1+6*x+x^2))/(8*x).

A334017 Table read by antidiagonals upward: T(n,k) is the number of ways to move a chess queen from (1,1) to (n,k) in the first quadrant using only up, right, and diagonal up-left moves.

Original entry on oeis.org

1, 1, 2, 2, 5, 10, 4, 13, 33, 63, 8, 32, 98, 240, 454, 16, 76, 269, 777, 1871, 3539, 32, 176, 702, 2295, 6420, 15314, 29008, 64, 400, 1768, 6393, 19970, 54758, 129825, 246255, 128, 896, 4336, 17088, 58342, 176971, 478662, 1129967, 2145722, 256, 1984, 10416
Offset: 1

Views

Author

Peter Kagey, Apr 12 2020

Keywords

Comments

First row is A175962.

Examples

			Table begins:
n\k|  1   2     3      4       5        6         7          8
---+----------------------------------------------------------
  1|  1   2    10     63     454     3539     29008     246255
  2|  1   5    33    240    1871    15314    129825    1129967
  3|  2  13    98    777    6420    54758    478662    4266102
  4|  4  32   269   2295   19970   176971   1593093   14532881
  5|  8  76   702   6393   58342   536080   4965056   46345046
  6| 16 176  1768  17088  163041  1550809  14765863  140982374
  7| 32 400  4336  44280  440602  4332221  42373370  413689403
  8| 64 896 10416 111984 1159580 11771312 118190333 1179448443
For example, the T(2,2) = 5 sequences of permissible queen's moves from (1,1) to (2,2) are:
(1,1) -> (1,2) -> (2,2),
(1,1) -> (2,1) -> (1,2) -> (2,2),
(1,1) -> (2,1) -> (2,2),
(1,1) -> (2,1) -> (3,1) -> (2,2), and
(1,1) -> (3,1) -> (2,2).
		

Crossrefs

Cf. A175962.
Cf. A035002 (up, right), A059450 (right, up-left), A132439 (up, right, up-right), A279212 (up, right, up-left), A334016 (right, up-right, up-left).
A033877 is the analog for king moves. For both king and queen moves, A094727 is the length of the longest sequence of moves.
Previous Showing 21-25 of 25 results.