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

A108073 Triangle in A071943 with rows reversed.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 9, 7, 3, 1, 31, 24, 12, 4, 1, 113, 89, 46, 18, 5, 1, 431, 342, 183, 76, 25, 6, 1, 1697, 1355, 741, 323, 115, 33, 7, 1, 6847, 5492, 3054, 1376, 520, 164, 42, 8, 1, 28161, 22669, 12768, 5900, 2326, 786, 224, 52, 9, 1, 117631, 94962, 54033, 25464
Offset: 0

Views

Author

N. J. A. Sloane, Jun 05 2005

Keywords

Comments

A convolution triangle based on A052709 (with first term omitted). - Philippe Deléham, Sep 15 2005

Examples

			1; 1,1; 3,2,1; 9,7,3,1; 31,24,12,4,1; ...
		

Crossrefs

Row sums yield A071356. Column 0 yields A052709.

Programs

  • Maple
    q:=sqrt(1-4*z-4*z^2): G:=(1-q)/z/(2-t+2*z+t*q): Gserz:=simplify(series(G,z=0,14)): P[0]:=1: for n from 1 to 10 do P[n]:=coeff(Gserz,z^n) od: for n from 0 to 10 do seq(coeff(t*P[n],t^k),k=1..n+1) od; # yields sequence in triangular form # Emeric Deutsch, Jun 06 2005
  • Mathematica
    T[n_, n_] = 1; T[n_, k_] := (k+1)*Sum[Binomial[i, n-k-i] * Binomial[k+2*i, i] / (k+i+1), {i, 1, n-k}]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 29 2015, after Vladimir Kruchinin *)
  • Maxima
    T(n,k):=if n=k then 1 else k*sum((binomial(i,n-k-i)*binomial(k+2*i-1,i))/(k+i),i,1,n-k); /* Vladimir Kruchinin, Apr 27 2015 */

Formula

G.f.: (1-q)/(z(2 - t + 2z + tq)), where q = sqrt(1 - 4z - 4z^2). - Emeric Deutsch, Jun 06 2005
T(0, 0) = 1; T(n, k) = 0 if k < 0 or if k > n; T(n, k) = Sum_{j>=0} T(n-1, k-1+j) + Sum_{j>=0} T(n-1, k+1+j). - Philippe Deléham, Sep 15 2005
T(n,k) = k*Sum_{i=1..(n-k)} C(i,n-k-i)*C(k+2*i-1,i)/(k+i), n > k, T(n,n)=1. - Vladimir Kruchinin, Apr 27 2015

Extensions

More terms from Emeric Deutsch, Jun 06 2005

A052709 Expansion of g.f. (1-sqrt(1-4*x-4*x^2))/(2*(1+x)).

Original entry on oeis.org

0, 1, 1, 3, 9, 31, 113, 431, 1697, 6847, 28161, 117631, 497665, 2128127, 9183489, 39940863, 174897665, 770452479, 3411959809, 15181264895, 67833868289, 304256253951, 1369404661761, 6182858317823, 27995941060609, 127100310290431, 578433619525633, 2638370120138751
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

A simple context-free grammar.
Number of lattice paths from (0,0) to (2n-2,0) that stay (weakly) in the first quadrant and such that each step is either U=(1,1), D=(1,-1), or L=(3,1). Equivalently, underdiagonal lattice paths from (0,0) to (n-1,n-1) and such that each step is either (1,0), (0,1), or (2,1). E.g., a(4)=9 because in addition to the five Dyck paths from (0,0) to (6,0) [UDUDUD, UDUUDD, UUDDUD, UUDUDD, UUUDDD] we have LDUD, LUDD, ULDD and UDLD. - Emeric Deutsch, Dec 21 2003
Hankel transform of a(n+1) is A006125(n+1). - Paul Barry, Apr 01 2007
Also, a(n+1) is the number of walks from (0,0) to (n,0) using steps (1,1), (1,-1) and (0,-1). See the U(n,k) array in A071943, where A052709(n+1) = U(n,0). - N. J. A. Sloane, Mar 29 2013
Diagonal sums of triangle in A085880. - Philippe Deléham, Nov 15 2013
From Gus Wiseman, Jun 17 2021: (Start)
Conjecture: For n > 0, also the number of sequences of length n - 1 covering an initial interval of positive integers and avoiding three terms (..., x, ..., y, ..., z, ...) such that x <= y <= z. The version avoiding the strict pattern (1,2,3) is A226316. Sequences covering an initial interval are counted by A000670. The a(1) = 1 through a(4) = 9 sequences are:
() (1) (1,1) (1,2,1)
(1,2) (1,3,2)
(2,1) (2,1,1)
(2,1,2)
(2,1,3)
(2,2,1)
(2,3,1)
(3,1,2)
(3,2,1)
(End)

Crossrefs

Programs

  • Magma
    [0] cat [(&+[Binomial(n,k+1)*Binomial(2*k,n-1): k in [0..n-1]])/n: n in [1..30]]; // G. C. Greubel, May 30 2022
    
  • Maple
    spec := [S,{C=Prod(B,Z),S=Union(B,C,Z),B=Prod(S,S)},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    InverseSeries[Series[(y-y^2)/(1+y^2), {y, 0, 24}], x] (* then A(x)= y(x) *) (* Len Smiley, Apr 12 2000 *)
    CoefficientList[Series[(1 -Sqrt[1 -4x -4x^2])/(2(1+x)), {x, 0, 33}], x] (* Vincenzo Librandi, Feb 12 2016 *)
  • PARI
    a(n)=polcoeff((1-sqrt(1-4*x*(1+x+O(x^n))))/2/(1+x),n)
    
  • SageMath
    [sum(binomial(k, n-k-1)*catalan_number(k) for k in (0..n-1)) for n in (0..30)] # G. C. Greubel, May 30 2022

Formula

a(n) + a(n-1) = A025227(n).
a(n) = Sum_{k=0..floor((n-1)/2)} (2*n-2-2*k)!/(k!*(n-k)!*(n-1-2*k)!). - Emeric Deutsch, Nov 14 2001
D-finite with recurrence: n*a(n) = (3*n-6)*a(n-1) + (8*n-18)*a(n-2) + (4*n-12)*a(n-3), n>2. a(1)=a(2)=1.
a(n) = b(1)*a(n-1) + b(2)*a(n-2) + ... + b(n-1)*a(1) for n>1 where b(n)=A025227(n).
G.f.: A(x) = x/(1-(1+x)*A(x)). - Paul D. Hanna, Aug 16 2002
G.f.: A(x) = x/(1-z/(1-z/(1-z/(...)))) where z=x+x^2 (continued fraction). - Paul D. Hanna, Aug 16 2002; revised by Joerg Arndt, Mar 18 2011
a(n+1) = Sum_{k=0..n} Catalan(k)*binomial(k, n-k). - Paul Barry, Feb 22 2005
From Paul Barry, Mar 14 2006: (Start)
G.f. is x*c(x*(1+x)) where c(x) is the g.f. of A000108.
Row sums of A117434. (End)
a(n+1) = (1/(2*Pi))*Integral_{x=2-2*sqrt(2)..2+2*sqrt(2)} x^n*(4+4x-x^2)/(2*(1+x)). - Paul Barry, Apr 01 2007
From Gary W. Adamson, Jul 22 2011: (Start)
For n>0, a(n) is the upper left term in M^(n-1), where M is an infinite square production matrix as follows:
1, 1, 0, 0, 0, 0, ...
2, 1, 1, 0, 0, 0, ...
2, 2, 1, 1, 0, 0, ...
2, 2, 2, 1, 1, 0, ...
2, 2, 2, 2, 1, 1, ...
... (End)
G.f.: x*Q(0), where Q(k) = 1 + (4*k+1)*x*(1+x)/(k+1 - x*(1+x)*(2*k+2)*(4*k+3)/(2*x*(1+x)*(4*k+3) + (2*k+3)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 14 2013
a(n) ~ sqrt(2-sqrt(2))*2^(n-1/2)*(1+sqrt(2))^(n-1)/(n^(3/2)*sqrt(Pi)). - Vaclav Kotesovec, Jun 29 2013
a(n+1) = Sum_{k=0..floor(n/2)} A085880(n-k,k). - Philippe Deléham, Nov 15 2013

Extensions

Better g.f. and recurrence from Michael Somos, Aug 03 2000
More terms from Larry Reeves (larryr(AT)acm.org), Oct 03 2000

A071356 Expansion of (1 - 2*x - sqrt(1 - 4*x - 4*x^2))/(4*x^2).

Original entry on oeis.org

1, 2, 6, 20, 72, 272, 1064, 4272, 17504, 72896, 307648, 1312896, 5655808, 24562176, 107419264, 472675072, 2091206144, 9296612352, 41507566592, 186045061120, 836830457856, 3776131489792, 17089399689216, 77548125675520, 352766964908032
Offset: 0

Views

Author

N. J. A. Sloane, Jun 12 2002

Keywords

Comments

Number of underdiagonal lattice paths from (0,0) to the line x=n, using only steps R=(1,0), V=(0,1) and D=(1,2). Also number of Motzkin paths of length n in which both the "up" and the "level" steps come in two colors. E.g., a(2)=6 because we have RR, RVR, RRV, RD, RVRV and RRVV. - Emeric Deutsch, Dec 21 2003
Inverse binomial transform of little Schroeder numbers 1,3,11,... (A001003 with first term deleted). - David Callan, Feb 07 2004
a(n) is the number of planar trees satisfying: 1) Every internal node has at least two children, 2) Among the children of a node, only the leftmost and the rightmost children can be leaves, 3) The tree has n+1 leaves. For instance, a(3)=6. - Marcelo Aguiar (maguiar(AT)math.tamu.edu), Oct 14 2005
Hankel transform is A006125(n+1)=2^C(n+1,2). - Paul Barry, Jan 08 2008
Equals binomial transform of A025235: (1, 1, 3, 7, 21, 61, 191, ...). - Gary W. Adamson, Sep 03 2010
Conjecturally, the number of sequences (e(1), ..., e(n+1)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) > e(j) <= e(k). [Martinez and Savage, 2.19] - Eric M. Schmidt, Jul 17 2017
Let s denote West's stack-sorting map, and let Av_n(tau_1, ..., tau_r) denote the set of permutations of [n] that avoid the patterns tau_1, ..., tau_r. It is conjectured that a(n) = |s^{-1}(Av_{n+1}(132, 231))| = |s^{-1}(Av_{n+1}(132, 312))| = |s^{-1}(Av_{n+1}(231, 312))|. Only the last of these equalities is known. - Colin Defant, Sep 16 2018

Examples

			a(3) = 20 = sum of top row terms in M^3 = (9 + 7 + 3 + 1).
		

Crossrefs

A036774(n) = a(n-1) * n! / 2^(n-1).
Row sums of A071943.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30); Coefficients(R!((1 - 2*x - Sqrt(1 - 4*x - 4*x^2))/(4*x^2))); // Vincenzo Librandi, Jan 21 2020
  • Mathematica
    CoefficientList[Series[(1-2*x-Sqrt[1-4*x-4*x^2])/(4*x^2), {x, 0, 20}], x] (* Vaclav Kotesovec, Sep 24 2013 *)
    a[n_] := 2^n Hypergeometric2F1[(1-n)/2, -n/2, 2, 2];
    Table[a[n], {n, 0, 24}] (* Peter Luschny, May 30 2021 *)
  • PARI
    a(n)=if(n<0,0,n++; polcoeff(serreverse(x/(1+2*x+2*x^2)+x*O(x^n)),n))
    
  • PARI
    {a(n)= if(n<1, n==0, polcoeff( 2/(1 -2*x +sqrt(1 -4*x -4*x^2 +x*O(x^n))), n))}
    
  • PARI
    {a(n)= local(A); if(n<0, 0, A= x*O(x^n); n!*simplify(polcoeff( exp(2*x +A)* besseli(1, 2*x* quadgen(8) +A), n)))} /* Michael Somos, Mar 31 2007 */
    
  • Sage
    def A071356_list(n):  # n>=1
        T = [0]*(n+1); R = [1]
        for m in (1..n-1):
            a,b,c = 1,0,0
            for k in range(m,-1,-1):
                r = a + 2*(b + c)
                if k < m : T[k+2] = u;
                a,b,c = T[k-1],a,b
                u = r
            T[1] = u; R.append(u)
        return R
    A071356_list(25)  # Peter Luschny, Nov 01 2012
    

Formula

G.f. A(x) satisfies 2x^2*A(x)^2+(2x-1)*A(x)+1=0 and A(x)=1/(1-2x-2x^2/A(x)). - Michael Somos, Sep 06 2003
a(n) = Sum_{k=0..floor(n/2)} C(n, 2k)C(k)2^(n-2k)*2^k. - Paul Barry, May 18 2005
G.f.: (1 - 2*x - sqrt(1 - 4*x - 4*x^2) )/(4*x^2) = 2/(1 - 2*x +sqrt(1 - 4*x - 4*x^2)).
Moment representation is a(n) = (1/(4*Pi))*int(x^n*sqrt(4-4x-x^2), x, -2*sqrt(2)-2, 2*sqrt(2)-2). - Paul Barry, Jan 08 2008
G.f.: 1/(1-2x-2x^2/(1-2x-2x^2/(1-2x-2x^2/(1-2x-2x^2/(1-2x-2x^2/.... (continued fraction). - Paul Barry, Dec 06 2008
From Gary W. Adamson, Jul 22 2011: (Start)
a(n) = sum of top row terms of M^n, M = an infinite square production matrix as follows:
1, 1, 0, 0, 0, 0, ...
2, 1, 1, 0, 0, 0, ...
2, 2, 1, 1, 0, 0, ...
2, 2, 2, 1, 1, 0, ...
2, 2, 2, 2, 1, 1, ...
2, 2, 2, 2, 2, 1, ... (End)
E.g.f.: a(n) = n!* [x^n] exp(2*x)*BesselI(1, 2*sqrt(2)*x)/(sqrt(2)*x). - Peter Luschny, Aug 25 2012
D-finite with recurrence: (n+2)*a(n) +2*(-2*n-1)*a(n-1) +4*(-n+1)*a(n-2)=0. - R. J. Mathar, Dec 02 2012 (Formula verified and used for computations. - Fung Lam, Feb 24 2014)
a(n) ~ 2^(n - 1/4) * (1+sqrt(2))^(n + 3/2) / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Sep 24 2013, simplified Jan 26 2019
a(n) = A179190(n+2)/4. - R. J. Mathar, Jan 20 2020
a(n) = 2^n * hypergeom((1 - n)/2, -n/2, 2, 2). - Peter Luschny, May 30 2021
a(n) = (-2*î)^(n+2) * (Legendre_P(n+2, i) - Legendre_P(n, i))/(4*(2*n + 3)). - Peter Bala, May 06 2024
From Emanuele Munarini, Jun 13 2024: (Start)
a(n) = Sum_{k=0..floor(n/2)} binomial(n, k)*binomial(n-k, k)*2^(n-k)/(k+1).
a(n) = Sum_{k=0..floor((n+2)/3)} binomial(n-2k+2, 2k)*Catalan(n-2k+1).
a(n) = Sum_{k=0..floor((n+2)/4)} binomial(n-2k+1, 2k+1)*Catalan(n-2k). (End)

A071946 Triangle T(n,k) read by rows giving number of underdiagonal lattice paths from (0,0) to (n,k) using only steps R = (1,0), V = (0,1) and D = (3,1).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 4, 6, 6, 1, 6, 13, 19, 19, 1, 8, 23, 44, 63, 63, 1, 10, 37, 87, 156, 219, 219, 1, 12, 55, 155, 330, 568, 787, 787, 1, 14, 77, 255, 629, 1260, 2110, 2897, 2897, 1, 16, 103, 395, 1111, 2527, 4856, 7972, 10869, 10869, 1, 18, 133, 583, 1849, 4706, 10130, 18889, 30545, 41414, 41414
Offset: 0

Views

Author

N. J. A. Sloane, Jun 15 2002

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  1, 1;
  1, 2,  2;
  1, 4,  6,  6;
  1, 6, 13, 19, 19;
  ...
		

Crossrefs

Related arrays: A071943, A071944, A071945.
A108076 is the reverse, A119254 is the row sums and A071969 is the last (largest) number in each row.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(n=0 and k=0, 1,
         `if`(k<0 or nAlois P. Heinz, May 05 2023
  • Mathematica
    T[n_, k_] := T[n, k] = If[n == 0 && k == 0, 1,
       If[k < 0 || n < k, 0, T[n-1, k] + T[n, k-1] + T[n-3, k-1]]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 25 2025, after Alois P. Heinz *)

Extensions

More terms from Joshua Zucker, May 10 2006

A378323 Square array T(n,k), n >= 0, k >= 0, read by antidiagonals downwards, where T(n,0) = 0^n and T(n,k) = k * Sum_{r=0..n} binomial(3r+k,r) * binomial(r,n-r)/(3*r+k) for k > 0.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 4, 0, 1, 3, 9, 18, 0, 1, 4, 15, 44, 94, 0, 1, 5, 22, 79, 240, 529, 0, 1, 6, 30, 124, 450, 1390, 3135, 0, 1, 7, 39, 180, 737, 2685, 8404, 19270, 0, 1, 8, 49, 248, 1115, 4532, 16585, 52426, 121732, 0, 1, 9, 60, 329, 1599, 7066, 28624, 105147, 334964, 785496, 0
Offset: 0

Views

Author

Seiichi Manyama, Nov 23 2024

Keywords

Examples

			Square array begins:
  1,    1,    1,     1,     1,     1,     1, ...
  0,    1,    2,     3,     4,     5,     6, ...
  0,    4,    9,    15,    22,    30,    39, ...
  0,   18,   44,    79,   124,   180,   248, ...
  0,   94,  240,   450,   737,  1115,  1599, ...
  0,  529, 1390,  2685,  4532,  7066, 10440, ...
  0, 3135, 8404, 16585, 28624, 45655, 69021, ...
		

Crossrefs

Columns k=0..2 give A000007, A364475, A371576.
Cf. A378318.

Programs

  • PARI
    T(n, k, t=3, u=0) = if(k==0, 0^n, k*sum(r=0, n, binomial(t*r+u*(n-r)+k, r)*binomial(r, n-r)/(t*r+u*(n-r)+k)));
    matrix(7, 7, n, k, T(n-1, k-1))

Formula

G.f. A_k(x) of column k satisfies A_k(x) = ( 1 + x * (1 + x) * A_k(x)^(3/k) )^k for k > 0.
G.f. of column k: B(x)^k where B(x) is the g.f. of A364475.
B(x)^k = B(x)^(k-1) + x * B(x)^(k+2) + x^2 * B(x)^(k+2). So T(n,k) = T(n,k-1) + T(n-1,k+2) + T(n-2,k+2) for n > 1.

A223092 Triangle read by rows: let T(n,k) (for n >= 0, 0 <= k <= n) be the number of walks from (0,0) to (n,k) using steps (1,1), (1,0), (1,-1) and (0,-1); n-th row of triangle gives T(n,n), T(n,n-1), ..., T(n,0).

Original entry on oeis.org

1, 1, 2, 1, 4, 7, 1, 6, 18, 29, 1, 8, 33, 86, 133, 1, 10, 52, 179, 431, 650, 1, 12, 75, 316, 978, 2238, 3319, 1, 14, 102, 505, 1874, 5406, 11941, 17498, 1, 16, 133, 754, 3235, 11020, 30241, 65086, 94525, 1, 18, 168, 1071, 5193, 20202, 64698, 171045, 360897, 520508, 1, 20, 207, 1464, 7896, 34362, 124455, 380400, 977040, 2029490, 2910895
Offset: 0

Views

Author

N. J. A. Sloane, Mar 29 2013

Keywords

Examples

			Triangle begins:
[1]
[1, 2]
[1, 4, 7]
[1, 6, 18, 29]
[1, 8, 33, 86, 133]
[1, 10, 52, 179, 431, 650]
[1, 12, 75, 316, 978, 2238, 3319]
...
The T(n,k) array begins:
4:  0  0  0  0   1  10 ...
3:  0  0  0  1   8  52 ...
2:  0  0  1  6  33 179 ...
1:  0  1  4 18  86 431 ...
0:  1  2  7 29 133 650 ...
-------------------------
k/n:0  1  2  3   4   5 ...
T(5,2) = T(5,3) + T(4,3) + T(4,2) + T(4,1) = 52 + 8 + 33 + 86 = 179.- _Philippe Deléham_, Mar 29 2013
This is also Dziemianczuk's array N(-i,i+j) read by antidiagonals:
1,2,7,29,133,650,3319,17498, ...
1,4,18,86,431,2238,11941,65086, ...
1,6,33,179,978,5406,30241,171045, ...
1,8,52,316,1874,11020,64698,380400, ...
1,10,75,505,3235,20202,124455,761160, ...
... - _N. J. A. Sloane_, Dec 05 2013
		

Crossrefs

Cf. A064641 (T(n,0)), A071943, A052709.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(n=0 and k=0, 1,
          `if`(n<0 or k<0 or k>n, 0, add(T(n-l[1], k-l[2]),
           l=[[1, 1], [1, 0], [1, -1], [0, -1]]) ))
        end:
    seq(seq(T(n, n-j), j=0..n), n=0..10);  # Alois P. Heinz, Apr 08 2013
  • Mathematica
    max = 10; T[0, 0] = 1; T[n_ /; n >= 0, k_ /; 0 <= k <= max] := T[n, k] = T[n, k+1]+T[n-1, k+1]+T[n-1, k]+T[n-1, k-1]; T[n_, k_] = 0; Table[Table[T[n, k], {k, n, 0, -1}], {n, 0, max}] // Flatten (* Jean-François Alcover, Mar 07 2014, after Philippe Deléham *)

Formula

T(n,k) = T(n,k+1) + T(n-1,k+1) + T(n-1,k) + T(n-1,k-1). - Philippe Deléham, Mar 29 2013
Showing 1-6 of 6 results.