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 41-50 of 103 results. Next

A062105 Square array read by antidiagonals: number of ways a pawn-like piece (with the initial 2-step move forbidden and starting from any square on the back rank) can end at various squares on an infinite chessboard.

Original entry on oeis.org

1, 1, 2, 1, 3, 5, 1, 3, 8, 13, 1, 3, 9, 22, 35, 1, 3, 9, 26, 61, 96, 1, 3, 9, 27, 75, 171, 267, 1, 3, 9, 27, 80, 216, 483, 750, 1, 3, 9, 27, 81, 236, 623, 1373, 2123, 1, 3, 9, 27, 81, 242, 694, 1800, 3923, 6046, 1, 3, 9, 27, 81, 243, 721, 2038, 5211, 11257, 17303, 1, 3, 9, 27
Offset: 0

Views

Author

Antti Karttunen, May 30 2001

Keywords

Comments

Table formatted as a square array shows the top-left corner of the infinite board.
The same array can also be constructed by the method used for constructing A217536, except with a top row consisting entirely of 1's instead of the natural numbers. - WG Zeist, Aug 25 2024

Examples

			Array begins:
 1       1       1       1       1       1       1       1       1       1       1
 2       3       3       3       3       3       3       3       3       3       3
 5       8       9       9       9       9       9       9       9       9 ...
 13      22      26      27      27      27      27      27      27 ...
 35      61      75      80      81      81      81 ...
 96      171     216     236     242     243 ...
 267     483     623     694     721 ...
 750     1373    1800    2038 ...
 2123    3923    5211 ...
 6046    11257 ...
 17303  ...
 ...
Formatted as a triangle:
 1,
 1, 2,
 1, 3, 5,
 1, 3, 8, 13,
 1, 3, 9, 22, 35,
 1, 3, 9, 26, 61, 96,
 1, 3, 9, 27, 75, 171, 267,
 1, 3, 9, 27, 80, 216, 483, 750,
 1, 3, 9, 27, 81, 236, 623, 1373, 2123,
 1, 3, 9, 27, 81, 242, 694, 1800, 3923, 6046,
 1, 3, 9, 27, 81, 243, 721, 2038, 5211, 11257, 17303,
 ...
		

Crossrefs

A005773 gives the left column of the table. A000244 (powers of 3) gives the diagonal of the table. Variant of A062104. Cf. also A062103, A020474, A217536.

Programs

  • Maple
    [seq(CPTVSeq(j),j=0..91)]; CPTVSeq := n -> ChessPawnTriangleV( (2+(n-((trinv(n)*(trinv(n)-1))/2))), ((((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1) );
    ChessPawnTriangleV := proc(r,c) option remember; if(r < 2) then RETURN(0); fi; if(c < 1) then RETURN(0); fi; if(2 = r) then RETURN(1); fi; RETURN(ChessPawnTriangleV(r-1,c-1)+ChessPawnTriangleV(r-1,c)+ChessPawnTriangleV(r-1,c+1)); end;
    M:=12; T:=Array(0..M,0..M,0);
    T[0,0]:=1; T[1,1]:=1;
    for i from 1 to M do T[i,0]:=0; od:
    for n from 2 to M do for k from 1 to n do
    T[n,k]:= T[n,k-1]+T[n-1,k-1]+T[n-2,k-1];
    od: od;
    rh:=n->[seq(T[n,k],k=0..n)];
    for n from 0 to M do lprint(rh(n)); od: # N. J. A. Sloane, Apr 11 2020
  • Mathematica
    T[n_, k_] := T[n, k] = If[n < 1 || k < 1, 0, If[n == 1, 1, T[n - 1, k - 1] + T[n - 1, k] + T[n - 1, k + 1]]]; Table[T[n - k + 1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Mar 04 2016, adapted from PARI *)
  • PARI
    T(n,k)=if(n<1 || k<1,0,if(n==1,1,T(n-1,k-1)+T(n-1,k)+T(n-1,k+1)))

Extensions

Edited by N. J. A. Sloane, May 22 2014

A107230 A number triangle of inverse Chebyshev transforms.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 6, 3, 1, 6, 12, 12, 4, 1, 10, 30, 30, 20, 5, 1, 20, 60, 90, 60, 30, 6, 1, 35, 140, 210, 210, 105, 42, 7, 1, 70, 280, 560, 560, 420, 168, 56, 8, 1, 126, 630, 1260, 1680, 1260, 756, 252, 72, 9, 1, 252, 1260, 3150, 4200, 4200, 2520, 1260, 360, 90, 10, 1
Offset: 0

Views

Author

Paul Barry, May 13 2005

Keywords

Comments

First column is A001405, second column is A100071, third column is A107231. Row sums are A005773(n+1), diagonal sums are A026003. The inverse Chebyshev transform concerned takes a g.f. g(x)->(1/sqrt(1-4x^2))g(xc(x^2)) where c(x) is the g.f. of A000108. It transforms a(n) to b(n) = Sum_{k=0..floor(n/2)} binomial(n,k)*a(n-2k). Then a(n) = Sum_{k=0..floor(n/2)} (n/(n-k))*(-1)^k*binomial(n-k,k) *b(n-2k).
Triangle read by rows: T(n,k) is the number of paths of length n with steps U=(1,1), D=(1,-1) and H=(1,0), starting at (0,0), staying weakly above the x-axis (i.e., left factors of Motzkin paths) and having k H steps. Example: T(3,1)=6 because we have HUD. HUU, UDH, UHD, UHU and UUH. Sum_{k=0..n} k*T(n,k) = A132894(n). - Emeric Deutsch, Oct 07 2007

Examples

			Triangle begins
   1;
   1,  1;
   2,  2,  1;
   3,  6,  3,  1;
   6, 12, 12,  4,  1;
  10, 30, 30, 20,  5,  1;
		

Crossrefs

Cf. A132894.

Programs

  • Magma
    [[Binomial(n, k)*Binomial(n-k, Floor((n-k)/2)): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Feb 11 2019
    
  • Maple
    T:=proc(n,k) options operator, arrow: binomial(n, k)*binomial(n-k, floor((1/2)*n-(1/2)*k)) end proc: for n from 0 to 11 do seq(T(n,k),k=0..n) end do; # yields sequence in triangular form - Emeric Deutsch, Oct 07 2007
  • Mathematica
    Table[Binomial[n, k]*Binomial[n-k, Floor[(n-k)/2]], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, Feb 11 2019 *)
  • PARI
    T(n, k) = binomial(n, k)*binomial(n-k, (n-k)\2); \\ Michel Marcus, Feb 10 2019
    
  • Sage
    [[binomial(n, k)*binomial(n-k, floor((n-k)/2)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Feb 11 2019

Formula

T(n,k) = binomial(n,k)*binomial(n-k, floor((n-k)/2)).
G.f.: G=G(t,z) satisfies z*(1-2*z-t*z)*G^2+(1-2*z-t*z)*G-1=0. - Emeric Deutsch, Oct 07 2007
E.g.f.: exp(x*y)*(BesselI(0,2*x)+BesselI(1,2*x)). - Vladeta Jovovic, Dec 02 2008

A185100 Dihedral unlabeled Motzkin numbers: number of ways of drawing any number of nonintersecting chords joining n unlabeled points equally spaced on a circle, up to rotations and reflections of the circle.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 11, 16, 36, 65, 150, 312, 756, 1743, 4353, 10732, 27489, 70379, 183866, 481952, 1277784, 3402661, 9126689, 24584870, 66567924, 180939737, 493801694, 1352203202, 3715137460, 10237545525, 28291018283, 78384998904, 217715672036, 606103034821, 1691020991782, 4727601528674, 13242641322252, 37162431389051, 104469244613429
Offset: 0

Views

Author

Max Alekseyev, Feb 07 2011

Keywords

Comments

Unlabeled version of A001006. Another version is given by A175954.
The number of ways of drawing exactly n chords joining 2n unlabeled points up to rotations and reflections is A006082(n+1). - Andrey Zabolotskiy, May 24 2018

Crossrefs

Cf. A001006 (labeled points), A175954 (up to rotations only), A175955, A005773, A006082.

Programs

  • Mathematica
    a1006[0] = 1; a1006[n_Integer] := a1006[n] = a1006[n - 1] + Sum[a1006[k]* a1006[n - 2 - k], {k, 0, n - 2}];
    a142150[n_] := n*(1 + (-1)^n)/4;
    a2426[n_] := Coefficient[(1 + x + x^2)^n, x, n];
    a175954[0] = 1; a175954[n_] := (1/n)*(a1006[n] + a142150[n]*a1006[n/2 - 1] + Sum[EulerPhi[n/d]*a2426[d], {d, Most @Divisors[n]}]);
    a5773[0] = 1; a5773[n_] := Sum[k/n*Sum[Binomial[n, j]*Binomial[j, 2*j - n - k], {j, 0, n}], {k, 1, n}];
    a[0] = 1;
    a[n_?OddQ] := With[{m = (n-1)/2}, (1/2)*(a175954[2*m + 1] + a5773[m + 1])];
    a[n_?EvenQ] := With[{m = n/2}, (1/4)*(2*a175954[2*m] + a5773[m] + a5773[m + 1] + a1006[m - 1])];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 02 2018, after Andrew Howroyd *)

Formula

a(2n+1) = (1/2) * (A175954(2n+1) + A005773(n+1)). - Andrew Howroyd, Apr 01 2017
a(2n) = (1/4) * (2 * A175954(2n) + A005773(n) + A005773(n+1) + A001006(n-1)) for n > 0. - Andrew Howroyd, Apr 01 2017

A264868 Number of rooted tandem duplication trees on n gene segments.

Original entry on oeis.org

1, 1, 2, 6, 22, 92, 420, 2042, 10404, 54954, 298648, 1660714, 9410772, 54174212, 316038060, 1864781388, 11111804604, 66782160002, 404392312896, 2465100947836, 15116060536540, 93184874448186, 577198134479356, 3590697904513792, 22425154536754776
Offset: 1

Views

Author

Peter Bala, Nov 27 2015

Keywords

Comments

Apparently a(n) is the number of words [d(0)d(1)d(2)...d(n)] where d(k) <= k (so d(0)=0) and if w(k-1) > w(k) then w(k-1) - w(k) = 1 (that is, descents by 2 or more are forbidden). - Joerg Arndt, Jan 26 2024

Examples

			Form _Joerg Arndt_, Jan 26 2024: (Start)
The a(5) = 22 words as described in the comment are (dots denote zeros, leading zeros omitted):
    1:  [ . . . ]
    2:  [ . . 1 ]
    3:  [ . . 2 ]
    4:  [ . . 3 ]
    5:  [ . 1 . ]
    6:  [ . 1 1 ]
    7:  [ . 1 2 ]
    8:  [ . 1 3 ]
    9:  [ . 2 1 ]
   10:  [ . 2 2 ]
   11:  [ . 2 3 ]
   12:  [ 1 . . ]
   13:  [ 1 . 1 ]
   14:  [ 1 . 2 ]
   15:  [ 1 . 3 ]
   16:  [ 1 1 . ]
   17:  [ 1 1 1 ]
   18:  [ 1 1 2 ]
   19:  [ 1 1 3 ]
   20:  [ 1 2 1 ]
   21:  [ 1 2 2 ]
   22:  [ 1 2 3 ]
(End)
		

References

  • Mathematics of Evolution and Phylogeny, O. Gascuel (ed.), Oxford University Press, 2005

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
           if n = 1 then 1 elif n = 2 then 1 else add((-1)^(k+1)*
              binomial(n+1-2*k, k)*a(n-k), k = 1..floor((n+1)/3))
           end if;
        end proc:
    seq(a(n), n = 1..24);
  • Mathematica
    a[n_] := a[n] = If[n == 1, 1, If[n == 2, 1, Sum[(-1)^(k+1) Binomial[n+1-2k, k] a[n-k], {k, 1, Floor[(n+1)/3]}]]]; Array[a, 25] (* Jean-François Alcover, May 29 2019 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def a(n):
        return 1 if n<3 else sum([(-1)**(k + 1)*binomial(n + 1 - 2*k, k)*a(n - k) for k in range(1, (n + 1)//3 + 1)])
    print([a(n) for n in range(1, 26)]) # Indranil Ghosh, Aug 30 2017

Formula

a(n) = Sum_{k = 1..floor((n + 1)/3)} (-1)^(k + 1)*binomial(n + 1 - 2*k,k)*a(n-k) with a(1) = a(2) = 1 (Yang and Zhang).
For n >= 3, (1/2)*a(n) = A086521(n) is the number of tandem duplication trees on n gene segments.
Main diagonal and row sums of A264869.
a(n) = Sum_{k=0..n-1} A291680(n-1,k). - Alois P. Heinz, Aug 29 2017

A026135 Number of (s(0),s(1),...,s(n)) such that every s(i) is a nonnegative integer, s(0) = 1, |s(1) - s(0)| = 1, |s(i) - s(i-1)| <= 1 for i >= 2. Also sum of numbers in row n+1 of the array T defined in A026120.

Original entry on oeis.org

1, 2, 5, 14, 39, 110, 312, 890, 2550, 7334, 21161, 61226, 177575, 516114, 1502867, 4383462, 12804429, 37452870, 109682319, 321563658, 943701141, 2772060618, 8149661730, 23978203662, 70600640796, 208014215066, 613266903927
Offset: 0

Views

Author

Keywords

Comments

a(n) is the total number of rows of consecutive peaks in all Motzkin (n+2)-paths. For example, with U=upstep, D=downstep, F=flatstep, the path FU(UD)FU(UDUDUD)DD(UD) contains 3 rows of peaks (in parentheses). The 9 Motzkin 4-paths are FFFF, FF(UD), F(UD)F, FUFD, (UD)FF, (UDUD), UFDF, UFFD, U(UD)D, containing a total of 5 rows of peaks and so a(2)=5. - David Callan, Aug 16 2006

Crossrefs

First differences are in A025566, second differences in A005773.
Pairwise sums of A025179.

Programs

  • Mathematica
    CoefficientList[Series[((x - 1)^2*((1 + x)/(1 - 3 x))^(1/2) + x^2 - 1)/(2*x^2), {x,0,50}], x] (* G. C. Greubel, May 22 2017 *)
  • PARI
    x='x+O('x^50); Vec(((x-1)^2*((1+x)/(1-3x))^(1/2) + x^2 - 1)/(2*x^2)) \\ G. C. Greubel, May 22 2017

Formula

a(n) = Sum_{k=0..n} binomial(n-1, k-1)*binomial(k+1, floor((k+1)/2)). - Vladeta Jovovic, Sep 18 2003
G.f.: ((x-1)^2*((1+x)/(1-3x))^(1/2) + x^2 - 1)/(2*x^2). - David Callan, Aug 16 2006
G.f. = (1+z)*(1+z^2)/(1-z) where z=x*A001006(x). [From R. J. Mathar, Jul 07 2009]
Conjecture: (n+2)*a(n) +3*(-n-1)*a(n-1) +(-n-2)*a(n-2) +3*(n-3)*a(n-3)=0. - R. J. Mathar, Jun 23 2013

Extensions

More terms from David Callan, Aug 16 2006
Typo in a(19) corrected by R. J. Mathar, Jul 07 2009

A054392 Number of permutations with certain forbidden subsequences.

Original entry on oeis.org

1, 1, 2, 5, 14, 42, 131, 418, 1352, 4410, 14463, 47605, 157084, 519255, 1718653, 5693903, 18877509, 62620857, 207816230, 689899944, 2290913666, 7608939443, 25276349558, 83977959853, 279039638062, 927272169336, 3081641953082
Offset: 0

Views

Author

N. J. A. Sloane, Elisa Pergola (elisa(AT)dsi.unifi.it), May 21 2000

Keywords

Comments

Apparently the Motzkin transform of A005251, after A005251(0) is set to 1. - R. J. Mathar, Dec 11 2008

Examples

			G.f. = 1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 42*x^5 + 131*x^6 + 418*x^7 + 1352*x^8 + ...
		

Crossrefs

Interpolates between Motzkin numbers (A001006) and Catalan numbers (A000108).

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30); Coefficients(R!( (2 -10*x +13*x^2 -5*x^3 +x^2*sqrt(1-2*x-3*x^2))/(2-12*x+22*x^2-14*x^3) )); // G. C. Greubel, Feb 14 2020
    
  • Maple
    m:=30; S:=series((2-10*x+13*x^2-5*x^3+x^2*sqrt(1-2*x-3*x^2))/(2-12*x+22*x^2 -14*x^3), x, m+1): seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Feb 14 2020
  • Mathematica
    a[0] = 1; a[n_]:= Module[{M}, M = Table[If[jJean-François Alcover, Aug 16 2018, after A054391 *)
    a[n_]:= a[n]= If[n<2, 1, If[n==2, 2, If[3<=n<=4, 9*n-22, ((8*n-19)*a[n-1] - (20*n-49)*a[n-2] +(11*n-1)*a[n-3] +(19*n-116)*a[n-4] -21*(n-5)*a[n-5])/(n-2) ]]]; Table[a[n], {n,0,30}] (* G. C. Greubel, Feb 14 2020 *)
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( subst( x * (1 - x) / (1 - 2*x + x^2 - x^3), x, serreverse( x / (1 + x + x^2) + x * O(x^n))), n))}; /* Michael Somos, Aug 06 2014 */
    
  • Sage
    def A054392_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (2-10*x+13*x^2-5*x^3+x^2*sqrt(1-2*x-3*x^2))/(2-12*x+22*x^2-14*x^3) ).list()
    A054392_list(30) # G. C. Greubel, Feb 14 2020

Formula

(n-2)*a(n) = (8*n-19)*a(n-1) - (20*n-49)*a(n-2) + (11*n-1)*a(n-3) + (19*n-116) * a(n-4) - 21*(n-5)*a(n-5). - R. J. Mathar, Aug 09 2015
G.f.: (2 -10*x +13*x^2 -5*x^3 +x^2*sqrt(1-2*x-3*x^2))/(2-12*x+22*x^2-14*x^3). - Michael D. Weiner, Feb 07 2020

A066822 The fourth column of A038622, triangular array that counts rooted polyominoes.

Original entry on oeis.org

1, 5, 20, 71, 238, 770, 2436, 7590, 23397, 71566, 217646, 659022, 1988805, 5986176, 17980968, 53922096, 161492571, 483149385, 1444245936, 4314214443, 12880107548, 38436170366, 114657076900, 341926185770, 1019435748435, 3038815305981, 9056974493700
Offset: 0

Author

Randall L Rathbun, Jan 19 2002

Keywords

Comments

There is a general solution for all rows of this triangular array: For the k-th row and n-th term on this row: a(0)=0; a(1)=1; a(n) = (2*k-1+n)*n*a(n) = 2*(n+k)*(n+k-1)*a(n-1) + 3*(n+k-1)*(n+k-2)*a(n-2).

Crossrefs

Programs

  • Haskell
    a066822 = flip a038622 3 . (+ 3)  -- Reinhard Zumkeller, Feb 26 2013
  • Maple
    a := n -> simplify(GegenbauerC(n,-n+1-4,-1/2)+GegenbauerC(n-1,-n-3,-1/2)):
    seq(a(n), n=0..20); # Peter Luschny, May 12 2016
  • Mathematica
    Table[GegenbauerC[n,-n-3,-1/2]+GegenbauerC[n-1,-n-3,-1/2],{n,0,40}] (* Harvey P. Dale, Feb 20 2017 *)
  • PARI
    s=[0,1]; {A038622(n,k)=if(n==0,1,t=(2*(n+k)*(n+k-1)*s[2]+3*(n+k-1)*(n+k-2)*s[1])/((n+2*k-1)*n); s[1]=s[2]; s[2]=t; t)}
    

Formula

a(0)=0; a(1)=1; (n+7)*n*a(n)=2*(n+4)*(n+3)*a(n-1) + 3*(n+3)*(n+2)*a(n-2).
a(n) = ((-3)^(1/2)/9)*(-2*(n+7)^(-1)*(n+4)*(-1)^n*hypergeom([3/2, n+6],[2],4/3)-(n+6)^(-1)*(-1)^n*(5*n+18)*hypergeom([3/2, n+5],[2],4/3)). - Mark van Hoeij, Oct 31 2011
a(n) ~ 3^(n+7/2) / sqrt(Pi*n). - Vaclav Kotesovec, Mar 10 2014
a(n) = GegenbauerC(n,-n+1-4,-1/2)+GegenbauerC(n-1,-n-3,-1/2). - Peter Luschny, May 12 2016

Extensions

More terms from Harvey P. Dale, Feb 20 2017

A081113 Number of paths of length n-1 a king can take from one side of an n X n chessboard to the opposite side.

Original entry on oeis.org

1, 4, 17, 68, 259, 950, 3387, 11814, 40503, 136946, 457795, 1515926, 4979777, 16246924, 52694573, 170028792, 546148863, 1747255194, 5569898331, 17698806798, 56076828573, 177208108824, 558658899825, 1757365514652
Offset: 1

Author

David Scambler, Apr 16 2003

Keywords

Comments

a(n) = number of sequences (a_1,a_2,...,a_n) with 1<=a_i<=n for all i and |a_(i+1)-a_(i)|<=1 for 1<=i<=n-1. For n=2 the sequences are 11, 12, 21, 22. - David Callan, Oct 24 2004
Simon Plouffe proposes the ordinary generating function A(x) (for offset zero) in the implicit form 3-10*x+12*x^2+(-4+30*x+54*x^3-72*x^2)*A(x)+(81*x^4+54*x^2+1-12*x-108*x^3)*A(x)^2 = 0 which delivers at least the first 200 terms (i.e., as far as tested) correctly. - David Scambler, R. J. Mathar, Jan 06 2011

Examples

			For n=2 the 4 paths are (0,0)->(0,1); (0,0)->(1,1); (1,0)->(0,1); (1,0)->(1,1).
		

Crossrefs

Cf. A005773 (paths which begin at a corner), diagonal of A296449.

Programs

  • Maple
    A026300 := proc(n,k) add( binomial(n,2*i+n-k)*(binomial(2*i+n-k,i) -binomial(2*i+n-k,i-1)), i=0..floor(k/2)) ; end proc:
    A081113 := proc(n) add(k*(n-k+1)*A026300(n-1,k-1),k=1..n) ; end proc:
    seq(A081113(n),n=1..20) ;
    # R. J. Mathar, Jun 09 2010
  • Mathematica
    t[n_, k_] := Sum[ Binomial[n, 2i + n - k] (Binomial[2i + n - k, i] - Binomial[2i + n - k, i - 1]), {i, 0, Floor[k/2]}] (* from A026300 *); f[n_] := Sum[ k(n - k + 1)t[n - 1, k - 1], {k, n}]; Array[f, 24]

Formula

a(n) = Sum_{k=1..n} k*(n-k+1)*M(n-1, k-1) where k*(n-k+1) is the triangular view of A003991 and M() is the Motzkin triangle A026300.
Conjecture: g.f.(x)=z*A064808(z), where z=x*A001006(x) and A...(x) are the corresponding generating functions. - R. J. Mathar, Jul 07 2009
Conjecture from WolframAlpha (verified for 1<=n<=180): (n+3)*a(n+4) = 27*n*a(n) +27*a(n+1) -9*(2*n+5)*a(n+2) +(8*n+21)*a(n+3). - Alexander R. Povolotsky, Jan 04 2011
Shorter recurrence: (n-1)*(2*n-7)*a(n) = (10*n^2-39*n+23)*a(n-1) - 3*(2*n^2-n-9)*a(n-2) - 9*(n-3)*(2*n-5)*a(n-3). - Vaclav Kotesovec, Oct 28 2012
a(n) ~ 3^(n-1)*n*(1-4/(sqrt(3*Pi*n))). - Vaclav Kotesovec, Oct 28 2012
a(n) = (n+2)*3^(n-2)+2*Sum_{k=0..n-3} (n-k-2)*3^(n-k-3)*A001006(k). [Yaqubi Corollary 2.8] - R. J. Mathar, Dec 13 2017

A115990 Riordan array (1/sqrt(1-2*x-3*x^2), (1-2*x-3*x^2)/(2*(1-3*x)) - sqrt(1-2*x-3*x^2)/2).

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 7, 5, 3, 1, 19, 13, 8, 4, 1, 51, 35, 22, 12, 5, 1, 141, 96, 61, 35, 17, 6, 1, 393, 267, 171, 101, 53, 23, 7, 1, 1107, 750, 483, 291, 160, 77, 30, 8, 1, 3139, 2123, 1373, 839, 476, 244, 108, 38, 9, 1, 8953, 6046, 3923, 2423, 1406, 752, 360, 147, 47, 10
Offset: 0

Author

Paul Barry, Feb 10 2006

Keywords

Comments

First column is central trinomial coefficients A002426. Second column is number of directed animals of size n+1, A005773(n+1). Row sums are A005717 (number of horizontal steps in all Motzkin paths of length n). First column has e.g.f. exp(x) I_0(2x). Row sums have e.g.f. dif(exp(x) I_1(2x),x).
Riordan array (1/sqrt(1-2*x-3*x^2), (1+x-sqrt(1-2*x-3*x^2))/2).

Examples

			Triangle begins
    1;
    1,  1;
    3,  2,  1;
    7,  5,  3,  1;
   19, 13,  8,  4,  1;
   51, 35, 22, 12,  5,  1;
  141, 96, 61, 35, 17,  6,  1;
		

Crossrefs

Cf. A115991, A005773 (k=1), A025566 (k=2), A035045 (k=3), A152948 (diag. n=k+2), .

Programs

  • GAP
    Flat(List([0..10], n-> List([0..n], k-> Sum([0..n], j-> Binomial(n-k, j-k)*Binomial(j, n-j)) ))); # G. C. Greubel, May 09 2019
  • Magma
    [[(&+[Binomial(n-k, j-k)*Binomial(j, n-j): j in [0..n]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, May 09 2019
    
  • Maple
    A115990 := proc(n,k)
        add(binomial(n-k,j-k)*binomial(j,n-j),j=0..n) ;
    end proc:
    seq(seq(A115990(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Jun 25 2023
  • Mathematica
    Table[Sum[ Binomial[n-k, j-k]*Binomial[j, n-j], {j, 0, n}], {n, 0, 10}, {k, 0, n} ] // Flatten (* G. C. Greubel, Mar 07 2017 *)
  • PARI
    {T(n, k) = sum(j=0, n, binomial(n-k, j-k)*binomial(j, n-j))}; \\ G. C. Greubel, May 09 2019
    
  • Sage
    [[sum(binomial(n-k, j-k)*binomial(j, n-j) for j in (0..n)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, May 09 2019
    

Formula

Number triangle T(n,k) = Sum_{j=0..n} C(n-k,j-k)*C(j,n-j).

A158793 Triangle read by rows: product of A130595 and A092392 considered as infinite lower triangular arrays.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 7, 4, 1, 1, 19, 9, 5, 1, 1, 51, 26, 11, 6, 1, 1, 141, 70, 34, 13, 7, 1, 1, 393, 197, 92, 43, 15, 8, 1, 1, 1107, 553, 265, 117, 53, 17, 9, 1, 1, 3139, 1570, 751, 346, 145, 64, 19, 10, 1, 1, 8953, 4476, 2156, 991, 441, 176, 76, 21, 11, 1, 1
Offset: 0

Author

Keywords

Comments

Riordan array (f(x), x*g(x)) where f(x) is the g.f. of A002426 and where g(x) is the g.f. of A005043. - Philippe Deléham, Dec 05 2009
Matrix product P * Q * P^(-1), where P denotes Pascal's triangle A007318 and Q denotes A061554 (formed from P by sorting the rows into descending order). Cf. A158815 and A171243. - Peter Bala, Jul 13 2021

Examples

			First rows of the triangle:
     1;
     1,    1;
     3,    1,    1;
     7,    4,    1,   1;
    19,    9,    5,   1,   1;
    51,   26,   11,   6,   1,   1;
   141,   70,   34,  13,   7,   1,  1;
   393,  197,   92,  43,  15,   8,  1,  1;
  1107,  553,  265, 117,  53,  17,  9,  1,  1;
  3139, 1570,  751, 346, 145,  64, 19, 10,  1, 1;
  8953, 4476, 2156, 991, 441, 176, 76, 21, 11, 1, 1;
		

Crossrefs

T(n, 0) = A002426(n), A005773 (row sums).

Programs

  • Maple
    A158793 := proc (n, k)
      add((-1)^(n+j)*binomial(n, j)*binomial(2*j-k, j-k), j = k..n);
    end proc:
    seq(seq(A158793(n, k), k = 0..n), n = 0..10); # Peter Bala, Jul 13 2021
  • Mathematica
    T[n_, k_] := (-1)^(k + n) Binomial[n, k] HypergeometricPFQ[{k/2 + 1/2, k/2 + 1, k - n}, {k + 1, k + 1}, 4];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Peter Luschny, Jul 17 2021 *)

Formula

T(n, m) = Sum_{k=m..n-1} A130595(n,k) * A092392(k+1,m+1), with the triangular interpretation of A092392.
Conjecture: T(n,1) = A113682(n-1). - R. J. Mathar, Oct 06 2009
Sum_{k=0..n} T(n,k)*x^k = A002426(n), A005773(n+1), A000244(n), A126932(n) for x = 0,1,2,3 respectively. - Philippe Deléham, Dec 03 2009
T(n, k) = (-1)^(k + n) binomial(n, k) hypergeom([k/2 + 1/2, k/2 + 1, k - n], [k + 1, k + 1], 4). - Peter Luschny, Jul 17 2021

Extensions

Simplified definition from R. J. Mathar, Oct 06 2009
Previous Showing 41-50 of 103 results. Next