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.

A025177 Triangular array, read by rows: first differences in n,n direction of trinomial array A027907.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 2, 4, 4, 4, 2, 1, 1, 3, 7, 10, 12, 10, 7, 3, 1, 1, 4, 11, 20, 29, 32, 29, 20, 11, 4, 1, 1, 5, 16, 35, 60, 81, 90, 81, 60, 35, 16, 5, 1, 1, 6, 22, 56, 111, 176, 231, 252, 231, 176, 111, 56, 22, 6, 1, 1, 7, 29, 84, 189, 343, 518, 659, 714, 659, 518, 343
Offset: 0

Views

Author

Keywords

Comments

The Motzkin transforms of the rows starting (1, 2), (1, 3) and (1, 4), extended by zeros after their last element, are apparently in A026134, A026109 and A026110. - R. J. Mathar, Dec 11 2008

Examples

			               1
            1  0  1
         1  1  2  1  1
      1  2  4  4  4  2  1
   1  3  7 10 12 10  7  3  1
1  4 11 20 29 32 29 20 11  4  1
		

Crossrefs

Columns include A025178, A025179, A025180, A025181, A025182.
Cf. A024996, A025192 (row sums).

Programs

  • Maple
    A025177 := proc(n,k)
        option remember;
        if k < 0 or k > 2*n then
            0;
        elif n = 0 then
            1 ;
        elif n = 1 then
            op(k+1,[1,0,1]) ;
        else
            procname(n-1,k-2)+procname(n-1,k-1)+procname(n-1,k) ;
        end if;
    end proc:
    seq(seq(A025177(n,k),k=0..2*n),n=0..20)  ; # R. J. Mathar, Feb 25 2015
  • Mathematica
    nmax = 10; CoefficientList[CoefficientList[Series[(1 - y*x)/(1 - x*(1 + y + y^2)), {x, 0, nmax}, {y, 0, 2*nmax}], x], y] // Flatten (* G. C. Greubel, May 22 2017; amended by Georg Fischer, Jun 24 2020 *)
  • PARI
    {T(n, k) = if( k<0 || k>2*n, 0, if( n==0, 1, if( n==1, [1,0,1][k+1], if( n==2, [1,1,2,1,1][k+1], T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)))))};
    
  • PARI
    T(n,k)=polcoeff(Ser(polcoeff(Ser((1-y*z)/(1-z*(1+y+y^2)),y),k,y),z),n,z)
    
  • PARI
    {T(n, k) = if( k<0 || k>2*n, 0, if( n==0, 1, polcoeff( (1 + x + x^2)^n, k) - polcoeff( (1 + x + x^2)^(n-1), k-1)))};
    
  • PARI
    g=matrix(33,65);
    for(n=0,32,for(k=0,2*n,g[n+1,k+1]=0));
    g[1,1]=1;
    g[2,1]=1;g[2,2]=0;g[2,3]=1;
    g[3,1]=1;g[3,2]=1;g[3,3]=2;g[3,4]=1;g[3,5]=1;
    for(n=0,2,for(k=0,2*n,print(n," ",k," ",g[n+1,k+1])))
    for(n=3,32,g[n+1,1]=1;print(n," 1 1");g[n+1,2]=n-1;print(n," 2 ",n-1);for(k=2,2*n,g[n+1,k+1]=g[n,k-1]+g[n,k]+g[n,k+1];print(n," ",k," ",g[n+1,k+1])))
    \\ Michael B. Porter, Feb 02 2010

Formula

T(n, k) = T(n-1, k-2) + T(n-1, k-1) + T(n-1, k), starting with [1], [1, 0, 1].
G.f.: (1-y*z)/[1-z*(1+y+y^2)].

Extensions

Edited by Ralf Stephan, Jan 09 2005
Offset corrected by R. J. Mathar, Feb 25 2015

A014533 Form array in which n-th row is obtained by expanding (1 + x + x^2)^n and taking the 4th column from the center.

Original entry on oeis.org

1, 5, 21, 77, 266, 882, 2850, 9042, 28314, 87802, 270270, 827190, 2520336, 7651632, 23162976, 69954048, 210859245, 634569201, 1907165337, 5725520801, 17172595110, 51465297950, 154135675070, 461366154990, 1380317174145
Offset: 1

Views

Author

Keywords

Comments

First differences seem to be in A025182.
a(n-3) = A111808(n, n-4) for n > 3. - Reinhard Zumkeller, Aug 17 2005
a(n-4) = number of paths in the half-plane x >= 0, from (0,0) to (n,4), and consisting of steps U=(1,1), D=(1,-1) and H=(1,0). For example, for n=5, we have the 5 paths HUUUU, UHUUU, UUHUU, UUUHU, UUUUH. - José Luis Ramírez Ramírez, Apr 19 2015

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.

Programs

  • Maple
    a := n -> simplify(GegenbauerC(n-1, -n-3, -1/2)):
    seq(a(n), n=1..25); # Peter Luschny, May 09 2016
  • Mathematica
    Rest[CoefficientList[Series[x*((1-x-Sqrt[1-2*x-3*x^2])/(2*x^2))^4/(1-x-2*x^2*(1-x-Sqrt[1-2*x-3*x^2])/(2*x^2)), {x, 0, 20}], x]] (* Vaclav Kotesovec, Apr 20 2015 *)
    Table[GegenbauerC[n-1, -n - 3, -1/2], {n,0,50}] (* G. C. Greubel, Feb 28 2017 *)
  • PARI
    x='x + O('x^50); Vec(x*((1-x-sqrt(1-2*x-3*x^2))/(2*x^2))^4/(1-x-2*x^2*(1-x-sqrt(1-2*x-3*x^2))/(2*x^2))) \\ G. C. Greubel, Feb 28 2017

Formula

Conjecture: -(n+7)*(n-1)*a(n) + (n+3)*(2*n+5)*a(n-1) + 3*(n+3)*(n+2)*a(n-2) = 0. - R. J. Mathar, Feb 25 2015
G.f.: z*M(z)^4/(1-z-2*z^2*M(z)), where M(z) is the g.f. of Motzkin paths. - José Luis Ramírez Ramírez, Apr 19 2015
a(n) ~ 3^(n+7/2) / (2*sqrt(Pi*n)). - Vaclav Kotesovec, Apr 20 2015
From Peter Luschny, May 09 2016: (Start)
a(n) = C(6+2*n, n-1)*hypergeom([-n+1, -n-7], [-5/2-n], 1/4).
a(n) = GegenbauerC(n-1, -n-3, -1/2). (End)

Extensions

More terms from James Sellers, Feb 05 2000

A026071 a(n) = number of (s(0), s(1), ..., s(n)) such that every s(i) is an integer, s(0) = 0, |s(i) - s(i-1)| = 1 for i = 1,2; |s(i) - s(i-1)| <= 1 for i >= 3, s(n) = 4. Also a(n) = T(n,n-4), where T is the array defined in A024996.

Original entry on oeis.org

1, 3, 12, 40, 133, 427, 1352, 4224, 13080, 40216, 122980, 374452, 1136226, 3438150, 10380048, 31279728, 94114125, 282804759, 848886180, 2545759328, 7628718845, 22845628531, 68377674280, 204560102800, 611720539235, 1828673918721
Offset: 4

Views

Author

Keywords

Comments

First differences of A025182.

Formula

Conjecture: -(n-4)*(n+4)*a(n) +(4*n+7)*(n-4)*a(n-1) +(-2*n^2+23*n-12)*a(n-2) -(4*n+3)*(n-4)*a(n-3) +3*(n-4)*(n-5)*a(n-4)=0. - R. J. Mathar, Jun 22 2013
Showing 1-3 of 3 results.