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-10 of 11 results. Next

A038622 Triangular array that counts rooted polyominoes.

Original entry on oeis.org

1, 2, 1, 5, 3, 1, 13, 9, 4, 1, 35, 26, 14, 5, 1, 96, 75, 45, 20, 6, 1, 267, 216, 140, 71, 27, 7, 1, 750, 623, 427, 238, 105, 35, 8, 1, 2123, 1800, 1288, 770, 378, 148, 44, 9, 1, 6046, 5211, 3858, 2436, 1296, 570, 201, 54, 10, 1, 17303, 15115, 11505, 7590, 4302, 2067, 825, 265
Offset: 0

Views

Author

N. J. A. Sloane, torsten.sillke(AT)lhsystems.com

Keywords

Comments

The PARI program gives any row k and any n-th term for this triangular array in square or right triangle array format. - Randall L Rathbun, Jan 20 2002
Triangle T(n,k), 0 <= k <= n, read by rows given by: T(0,0)=1, T(n,k)=0 if k < 0 or if k > n, T(n,0) = 2*T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-1) + T(n-1,k) + T(n-1,k+1) for k >= 1. - Philippe Deléham, Mar 27 2007
This triangle belongs to the family of triangles defined by: T(0,0)=1, T(n,k)=0 if k < 0 or if k > n, T(n,0) = x*T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-1) + y*T(n-1,k) + T(n-1,k+1) for k >= 1. Other triangles arise by choosing different values for (x,y): (0,0) -> A053121; (0,1) -> A089942; (0,2) -> A126093; (0,3) -> A126970; (1,0)-> A061554; (1,1) -> A064189; (1,2) -> A039599; (1,3) -> A110877; (1,4) -> A124576; (2,0) -> A126075; (2,1) -> A038622; (2,2) -> A039598; (2,3) -> A124733; (2,4) -> A124575; (3,0) -> A126953; (3,1) -> A126954; (3,2) -> A111418; (3,3) -> A091965; (3,4) -> A124574; (4,3) -> A126791; (4,4) -> A052179; (4,5) -> A126331; (5,5) -> A125906. - Philippe Deléham, Sep 25 2007
Triangle read by rows = partial sums of A064189 terms starting from the right. - Gary W. Adamson, Oct 25 2008
Column k has e.g.f. exp(x)*(Bessel_I(k,2x)+Bessel_I(k+1,2x)). - Paul Barry, Mar 08 2011

Examples

			From _Paul Barry_, Mar 08 2011: (Start)
Triangle begins
     1;
     2,    1;
     5,    3,    1;
    13,    9,    4,   1;
    35,   26,   14,   5,   1;
    96,   75,   45,  20,   6,   1;
   267,  216,  140,  71,  27,   7,  1;
   750,  623,  427, 238, 105,  35,  8, 1;
  2123, 1800, 1288, 770, 378, 148, 44, 9, 1;
Production matrix is
  2, 1,
  1, 1, 1,
  0, 1, 1, 1,
  0, 0, 1, 1, 1,
  0, 0, 0, 1, 1, 1,
  0, 0, 0, 0, 1, 1, 1,
  0, 0, 0, 0, 0, 1, 1, 1,
  0, 0, 0, 0, 0, 0, 1, 1, 1,
  0, 0, 0, 0, 0, 0, 0, 1, 1, 1
(End)
		

Crossrefs

Cf. A005773 (1st column), A005774 (2nd column), A005775, A066822, A000244 (row sums).

Programs

  • Haskell
    import Data.List (transpose)
    a038622 n k = a038622_tabl !! n !! k
    a038622_row n = a038622_tabl !! n
    a038622_tabl = iterate (\row -> map sum $
       transpose [tail row ++ [0,0], row ++ [0], [head row] ++ row]) [1]
    -- Reinhard Zumkeller, Feb 26 2013
  • Maple
    T := (n,k) -> simplify(GegenbauerC(n-k,-n+1,-1/2)+GegenbauerC(n-k-1,-n+1,-1/2)):
    for n from 1 to 9 do seq(T(n,k),k=1..n) od; # Peter Luschny, May 12 2016
  • Mathematica
    nmax = 10; t[n_ /; n > 0, k_ /; k >= 1] := t[n, k] = t[n-1, k-1] + t[n-1, k] + t[n-1, k+1]; t[0, 0] = 1; t[0, ] = 0; t[?Negative, ?Negative] = 0; t[n, 0] := 2 t[n-1, 0] + t[n-1, 1]; Flatten[ Table[ t[n, k], {n, 0, nmax}, {k, 0, n}]](* Jean-François Alcover, Nov 09 2011 *)
  • 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(n, k) = a(n-1, k-1) + a(n-1, k) + a(n-1, k+1) for k>0, a(n, k) = 2*a(n-1, k) + a(n-1, k+1) for k=0.
Riordan array ((sqrt(1-2x-3x^2)+3x-1)/(2x(1-3x)),(1-x-sqrt(1-2x-3x^2))/(2x)). Inverse of Riordan array ((1-x)/(1+x+x^2),x/(1+x+x^2)). First column is A005773(n+1). Row sums are 3^n (A000244). If L=A038622, then L*L' is the Hankel matrix for A005773(n+1), where L' is the transpose of L. - Paul Barry, Sep 18 2006
T(n,k) = GegenbauerC(n-k,-n+1,-1/2) + GegenbauerC(n-k-1,-n+1,-1/2). In this form also the missing first column of the triangle 1,1,1,3,7,19,... (cf. A002426) can be computed. - Peter Luschny, May 12 2016
From Peter Bala, Jul 12 2021: (Start)
T(n,k) = Sum_{j = k..n} binomial(n,j)*binomial(j,floor((j-k)/2)).
Matrix product of Riordan arrays ( 1/(1 - x), x/(1 - x) ) * ( (1 - x*c(x^2))/(1 - 2*x), x*c(x^2) ) = A007318 * A061554 (triangle version), where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108.
Triangle equals A007318^(-1) * A092392 * A007318. (End)
The n-th row polynomial R(n,x) equals the n-th degree Taylor polynomial of the function (1 + x)*(1 + x + x^2)^n expanded about the point x = 0. - Peter Bala, Sep 06 2022

Extensions

More terms from David W. Wilson

A026323 Irregular triangular array T read by rows: T(0,0) = 1, T(0,1) = T(0,2) = 0; T(1,0) = T(1,1) = T(1,2) = 1, T(1,3) = 0; for n >= 2, T(n,0) = 1, T(n,1) = T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k) for k = 2,3,...,n+1 and T(n,n+2) = T(n-1,n) + T(n-1,n+1).

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 0, 1, 2, 3, 2, 1, 1, 3, 6, 7, 6, 3, 1, 4, 10, 16, 19, 16, 9, 1, 5, 15, 30, 45, 51, 44, 25, 1, 6, 21, 50, 90, 126, 140, 120, 69, 1, 7, 28, 77, 161, 266, 356, 386, 329, 189, 1, 8, 36, 112, 266, 504, 783, 1008, 1071, 904, 518, 1, 9, 45, 156, 414, 882, 1553, 2295, 2862, 2983, 2493
Offset: 1

Views

Author

Keywords

Examples

			First five rows:
  1  0  0
  1  1  1  0
  1  2  3  2  1
  1  3  6  7  6  3
  1  4 10 16 19 16  0
		

Crossrefs

Programs

  • Mathematica
    t[0, 0] = 1; t[0, 1] = 0; t[0, 2] = 0; t[1, 0] = 1; t[1, 1] = 1;
    t[1, 2] = 1; t[1, 3] = 0;
    t[n_, 0] := 1; t[n_, 1] := t[n - 1, 0] + t[n - 1, 1];
    t[n_, k_] := t[n - 1, k - 2] + t[n - 1, k - 1] + t[n - 1, k] /; 2 <= k && k <= n + 1;
    t[n_, k_] := t[n - 1, k - 2] + t[n - 1, k - 1] /; k == n + 2;
    u = Table[t[n, k], {n, 0, 12}, {k, 0, n + 2}];
    TableForm[u] (*A026323 array*)
    v = Flatten[u] (*A026323 sequence*)
    (* Clark Kimberling, Aug 21 2014 *)

Extensions

Beginning of sequence changed from 1,0,0,1,1,1,1,2,3,2,1,1,3,6,7,6,3 by N. J. A. Sloane (7/98).

A026010 a(n) = number of (s(0), s(1), ..., s(n)) such that s(i) is a nonnegative integer and |s(i) - s(i-1)| = 1 for i = 1,2,...,n and s(0) = 2. Also a(n) = sum of numbers in row n+1 of array T defined in A026009.

Original entry on oeis.org

1, 2, 4, 7, 14, 25, 50, 91, 182, 336, 672, 1254, 2508, 4719, 9438, 17875, 35750, 68068, 136136, 260338, 520676, 999362, 1998724, 3848222, 7696444, 14858000, 29716000, 57500460, 115000920, 222981435, 445962870, 866262915, 1732525830, 3370764540
Offset: 0

Views

Author

Keywords

Comments

Conjecture: a(n) is the number of integer compositions of n + 2 in which the even parts appear as often at even positions as at odd positions (confirmed up to n = 19). - Gus Wiseman, Mar 17 2018

Examples

			The a(3) = 7 compositions of 5 in which the even parts appear as often at even positions as at odd positions are (5), (311), (131), (113), (221), (122), (11111). Missing are (41), (14), (32), (23), (212), (2111), (1211), (1121), (1112). - _Gus Wiseman_, Mar 17 2018
		

Crossrefs

Programs

  • Magma
    [(&+[Binomial(Floor((n+k)/2), Floor(k/2)): k in [0..n]]): n in [0..40]]; // G. C. Greubel, Nov 08 2018
  • Mathematica
    Array[Sum[Binomial[Floor[(# + k)/2], Floor[k/2]], {k, 0, #}] &, 34, 0] (* Michael De Vlieger, May 16 2018 *)
    Table[2^(-1 + n)*(((2 + 3*#)*Gamma[(1 + #)/2])/(Sqrt[Pi]*Gamma[2 + #/2]) &[n + Mod[n, 2]]), {n,0,40}] (* Peter Pein, Nov 08 2018 *)
    Table[(1/2)^((5 - (-1)^n)/2)*(6*n + 7 - 3*(-1)^n)*CatalanNumber[(2*n + 1 - (-1)^n)/4], {n, 0, 40}] (* G. C. Greubel, Nov 08 2018 *)
  • PARI
    vector(40, n, n--; sum(k=0,n, binomial(floor((n+k)/2), floor(k/2)))) \\ G. C. Greubel, Nov 08 2018
    

Formula

a(2*n) = ((3*n + 1)/(2*n + 1))*C(2*n + 1, n)= A051924(1+n), n>=0, a(2*n-1) = a(2*n)/2 = A097613(1+n), n >= 1. - Herbert Kociemba, May 08 2004
a(n) = Sum_{k=0..n} binomial(floor((n+k)/2), floor(k/2)). - Paul Barry, Jul 15 2004
Inverse binomial transform of A005774: (1, 3, 9, 26, 75, 216, ...). - Gary W. Adamson, Oct 22 2007
Conjecture: (n+3)*a(n) - 2*a(n-1) + (-5*n-3)*a(n-2) + 2*a(n-3) + 4*(n-3)*a(n-4) = 0. - R. J. Mathar, Jun 20 2013
a(n) = (1/2)^((5 - (-1)^n)/2)*(6*n + 7 - 3*(-1)^n)*Catalan((2*n + 1 - (-1)^n)/4), where Catalan is the Catalan number = A000108. - G. C. Greubel, Nov 08 2018

A114422 Riordan array (1/sqrt(1-2*x-3*x^2), M(x)-1) where M(x) is the g.f. of the Motzkin numbers A001006.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 7, 9, 5, 1, 19, 26, 19, 7, 1, 51, 75, 65, 33, 9, 1, 141, 216, 211, 132, 51, 11, 1, 393, 623, 665, 483, 235, 73, 13, 1, 1107, 1800, 2058, 1674, 963, 382, 99, 15, 1, 3139, 5211, 6294, 5598, 3663, 1739, 581, 129, 17, 1, 8953, 15115, 19095, 18261, 13243
Offset: 0

Views

Author

Paul Barry, Feb 12 2006

Keywords

Comments

First column is central trinomial numbers A002426.
Second column is A005774.
Third column is A025568.
Row sums are A116387.
Diagonal sums are A116388.
Product of A007318 and A116382.
Column k has e.g.f. exp(x)*Sum_{j=0..k} C(k,j)*Bessel_I(k+j,2*x).

Examples

			Triangle begins
1,
1, 1,
3, 3, 1,
7, 9, 5, 1,
19, 26, 19, 7, 1,
51, 75, 65, 33, 9, 1,
141, 216, 211, 132, 51, 11, 1
		

Programs

  • GAP
    T:=Flat(List([0..10], n->List([0..n], k->Sum([0..n], j-> Binomial(n, j-k)*Binomial(j, n-j))))); # G. C. Greubel, Dec 15 2018
  • Magma
    [[(&+[Binomial(n, j-k)*Binomial(j, n-j): j in [0..n]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Dec 15 2018
    
  • Mathematica
    T[n_, k_] := Sum[Binomial[n, j - k]*Binomial[j, n - j], {j,0,n}]; Table[T[n, k], {n,0,10}, {k,0,n}] // Flatten (* G. C. Greubel, Feb 28 2017 *)
  • PARI
    {T(n,k) = sum(j=0,n, binomial(n, j-k)*binomial(j, n-j))};
    for(n=0, 10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Dec 15 2018
    
  • Sage
    [[sum(binomial(n, j-k)*binomial(j, n-j) for j in range(n+1)) for k in range(n+1)] for n in range(10)] # G. C. Greubel, Dec 15 2018
    

Formula

Riordan array (1/sqrt(1-2*x-3*x^2), (1-x-2*x^2-sqrt(1-2*x-3*x^2) ) / (2*x^2)).
Number triangle T(n,k) = Sum_{j=0..n} C(n,j-k)*C(j,n-j).

A005775 Number of compact-rooted directed animals of size n having 3 source points.

Original entry on oeis.org

1, 4, 14, 45, 140, 427, 1288, 3858, 11505, 34210, 101530, 300950, 891345, 2638650, 7809000, 23107488, 68375547, 202336092, 598817490, 1772479905, 5247421410, 15538054455, 46019183840, 136325212750, 403933918375, 1197131976846, 3548715207534, 10521965227669
Offset: 3

Views

Author

Keywords

Comments

Binomial transform of A037955. - Paul Barry, Dec 28 2006
Apparently, the number of Dyck paths of semilength n that contain at least one UUU but avoid UUU's starting above level 0. - David Scambler, Jul 02 2013
a(n) = number of paths in the half-plane x >= 0 from (0,0) to (n-1,2) or (n-1,-3), and consisting of steps U=(1,1), D=(1,-1) and H=(1,0). For example, for n=5, we have the 14 paths: HHUU, UUHH, UHHU, HUUH, HUHU, UHUH, UDUU, UUDU, UUUD, DUUU, DDDH, HDDD, DHDD, DDHD. - José Luis Ramírez Ramírez, Apr 19 2015

Examples

			G.f. = x^3 + 4*x^4 + 14*x^5 + 45*x^6 + 140*x^7 + 427*x^8 + 1288*x^9 + 3858*x^10 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005773.
k=2 column of array in A038622.

Programs

  • Haskell
    a005775 = flip a038622 2 . (subtract 1)  -- Reinhard Zumkeller, Feb 26 2013
  • Maple
    seq(simplify(GegenbauerC(n-4,-n+1,-1/2) + GegenbauerC(n-3,-n+1,-1/2)),n=3..28); # Peter Luschny, May 12 2016
  • Mathematica
    nmax = 28; t[n_ /; n > 0, k_ /; k >= 1] := t[n, k] = t[n-1, k-1] + t[n-1, k] + t[n-1, k+1]; t[0, 0] = 1; t[0, ] = 0; t[?Negative, ?Negative] = 0; t[n, 0] := 2*t[n-1, 0] + t[n-1, 1]; a[n_] := t[n-1, 2]; Table[a[n], {n, 3, nmax} ] (* Jean-François Alcover, Jul 03 2013, from A038622 *)
  • PARI
    {a(n) = polcoeff( (x^2 + x - 1 + (x^2 - 3*x + 1) * sqrt((1 + x) / (1 - 3*x) + x^3 * O(x^n))) / (2*x^2), n)};
    
  • PARI
    {a(n) = n--; sum(k=0, n, binomial(n, k) * binomial(k, k\2 -1))}; /* Michael Somos, May 12 2016 */
    

Formula

D-finite with recurrence (n+2)*(n-3)*a(n) = 2*n*(n-1)*a(n-1) + 3*(n-1)*(n-2)*a(n-2), a(2)=0, a(3)=1. - Michael Somos, Feb 02 2002
G.f.: (x^2 + x - 1 +(x^2 - 3*x + 1)*sqrt((1+x)/(1-3*x)))/(2*x^2).
From Paul Barry, Dec 28 2006: (Start)
E.g.f.: exp(x)*(Bessel_I(2,2*x) + Bessel_I(3,2*x));
a(n+1) = Sum_{k=0..n} C(n,k)*C(k,floor(k/2)-1). (End)
a(n) ~ 3^(n-1/2) / sqrt(Pi*n). - Vaclav Kotesovec, Feb 25 2014
G.f.: (z^3*M(z)^2+z^4*M(z)^3)/(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) = GegenbauerC(n-4,-n+1,-1/2) + GegenbauerC(n-3,-n+1,-1/2). - Peter Luschny, May 12 2016
0 = a(n)*(+9*a(n+1) - 63*a(n+2) - 54*a(n+3) + 87*a(n+4) - 21*a(n+5))+ a(n+1)*(+21*a(n+1) + 79*a(n+2) + 13*a(n+3) - 118*a(n+4) + 35*a(n+5)) + a(n+2)*(-14*a(n+2) + 79*a(n+3) - 67*a(n+4) + 14*a(n+5)) + a(n+3)*(+6*a(n+3) + 19*a(n+4) - 11*a(n+5)) + a(n+4)*(+a(n+4) + a(n+5)) if n >= 0. - Michael Somos, May 12 2016
a(n) = A005773(n) - A001006(n) for n >= 3. - John Keith, Nov 20 2020

Extensions

More terms from Randall L Rathbun, Jan 19 2002
Edited by Michael Somos, Feb 02 2002

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

Views

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

A035045 Inverse binomial transform of A002054.

Original entry on oeis.org

1, 4, 12, 35, 101, 291, 839, 2423, 7011, 20326, 59038, 171777, 500603, 1461032, 4269828, 12493857, 36599403, 107325540, 315027276, 925501857, 2721208599, 8007114171, 23577440439, 69470880381, 204821487269, 604223501426, 1783419354954, 5266582196407, 15560042628205
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A005774.

Programs

  • Mathematica
    Table[Sum[(-1)^(n-k)*Binomial[n,k]*Binomial[2k+3,k],{k,0,n}],{n,0,22}] (* Vaclav Kotesovec, Oct 08 2012 *)
  • PARI
    a(n)=sum(k=0,n,(-1)^(n-k)*binomial(n,k)*binomial(2*k+3,k) ); \\ Joerg Arndt, May 04 2013

Formula

Recurrence: (n+3)*(3*n-1)*a(n) = (6*n^2+19*n+7)*a(n-1) + 3*(n-1)*(3*n+2)*a(n-2). - Vaclav Kotesovec, Oct 08 2012
a(n) ~ 4*3^(n+1/2)/sqrt(Pi*n). - Vaclav Kotesovec, Oct 08 2012

A098494 Triangle read by rows: coefficients of polynomials E(n,x) related to partitions with parts occurring at most thrice.

Original entry on oeis.org

1, 1, -1, 1, -5, 4, 1, -12, 35, -30, 1, -22, 143, -362, 312, 1, -35, 405, -2065, 4814, -4200, 1, -51, 925, -7965, 35434, -78744, 69120, 1, -70, 1834, -24010, 173929, -709240, 1525236, -1345680, 1, -92, 3290, -61040, 655529, -4235588, 16255420, -34148400, 30240000
Offset: 0

Views

Author

Ralf Stephan, Sep 12 2004

Keywords

Comments

The polynomials generate (-1)^k*n! times the diagonals of A098493.

Examples

			E(0,x) = 1
E(1,x) = x - 1
E(2,x) = x^2 - 5*x + 4
E(3,x) = x^3 - 12*x^2 + 35*x - 30
E(4,x) = x^4 - 22*x^3 + 143*x^2 - 362*x + 312
E(5,x) = x^5 - 35*x^4 + 405*x^3 - 2065*x^2 + 4814*x - 4200
		

Crossrefs

Columns include -A000326.
Constant terms E(n, 0) = -E(n-1, -1) = n!/2*A085455 = (-1)^n*n!*A005773.
Row sums are E(n, 1) = (-1)^n*n!*A005774(n-2). [corrected by Seiichi Manyama, Feb 04 2023]

Formula

E(n+1,x+1) - E(n+1,x) = (n+1) * ( E(n,x) - n * E(n-1,x-1) ).

A383527 Partial sums of A005773.

Original entry on oeis.org

1, 2, 4, 9, 22, 57, 153, 420, 1170, 3293, 9339, 26642, 76363, 219728, 634312, 1836229, 5328346, 15494125, 45137995, 131712826, 384900937, 1126265986, 3299509114, 9676690939, 28407473191, 83470059532, 245465090758, 722406781935, 2127562036990, 6270020029353
Offset: 0

Views

Author

Mélika Tebni, Apr 29 2025

Keywords

Comments

For p prime of the form 4*k+3 (A002145), a(p) == 0 (mod p).
For p Pythagorean prime (A002144), a(p) - 2 == 0 (mod p).
a(n) (mod 2) = A010059(n).
a(A000069(n+1)) is even.
a(A001969(n+1)) is odd.

Crossrefs

Programs

  • Maple
    gf := (1 + sqrt((1 + x) / (1 - 3*x))) / (2*(1 - x)):
    a := n-> coeff(series(gf, x, n+1), x, n):
    seq(a(n), n = 0 .. 29);
    # Recurrence:
    a:= proc(n) option remember; `if`(n<=2, 2^n, 3*a(n-1) - (6/n-1)*a(n-2) + (6/n-3)*a(n-3)) end:
    seq(a(n), n = 0 .. 29);
  • Mathematica
    Module[{a, n}, RecurrenceTable[{a[n] == 3*a[n-1] - (6-n)*a[n-2]/n + 3*(2-n)*a[n-3]/n, a[0] == 1, a[1] == 2, a[2] == 4}, a, {n, 0, 30}]] (* Paolo Xausa, May 05 2025 *)
  • Python
    from math import comb as C
    def a(n):
      return sum(C(n, k)*abs(sum((-1)**j*C(k, j) for j in range(k//2 + 1))) for k in range(n + 1))
    print([a(n) for n in range(30)])

Formula

First differences of A211278.
a(n) = Sum_{k=0..n} A167630(n, k).
Binomial transform of A210736 (see Python program).
G.f.: (1 + sqrt((1 + x) / (1 - 3*x))) / (2*(1 - x)).
E.g.f.: (Integral_{x=-oo..oo} BesselI(0,2*x) dx + (1 + BesselI(0,2*x)) / 2)*exp(x).
Recurrence: n*a(n) = 3*n*a(n-1) - (6-n)*a(n-2) + 3*(2-n)*a(n-3). If n <= 2, a(n) = 2^n.
a(n) ~ 3^(n + 1/2) / (2*sqrt(Pi*n)). - Vaclav Kotesovec, May 02 2025
From Mélika Tebni, May 09 2025: (Start)
a(n) = A257520(n) + A097893(n-1) for n > 0.
a(n) = Sum_{j=0..n}(Sum_{k=0..j} A122896(j, k)).
a(n+2) - 3*a(n+1) + 2*a(n) = A005774(n).
a(n+2) - 4*a(n+1) + 4*a(n) - a(n-1) = A005775(n) for n >= 3. (End)

A114580 Triangle read by rows: T(n,k) is the number of Motzkin paths of length n having k ascents (0<=k<=floor(n/2)); an ascent is a maximal string of upsteps.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 7, 1, 1, 14, 6, 1, 26, 23, 1, 1, 46, 70, 10, 1, 79, 186, 56, 1, 1, 133, 451, 235, 15, 1, 221, 1025, 825, 115, 1, 1, 364, 2220, 2562, 630, 21, 1, 596, 4634, 7274, 2794, 211, 1, 1, 972, 9396, 19286, 10696, 1456, 28, 1, 1581, 18612, 48450, 36715
Offset: 0

Views

Author

Emeric Deutsch, Dec 09 2005

Keywords

Comments

Row n contains 1+floor(n/2) terms. Row sums are the Motzkin numbers (A001006). Sum(k*T(n,k),k=0..floor(n/2))=A005774(n-1).

Examples

			T(4,1) = 7 because we have HH(U)D, H(U)DH, H(U)HD, (U)DHH, (U)HDH, (U)HHD and (UU)HH, where U=(1,1), H=(1,0), D=(1,-1) (the ascents are shown between parentheses).
Triangle begins:
1;
1;
1,  1;
1,  3;
1,  7,  1;
1, 14,  6;
1, 26, 23, 1;
		

Crossrefs

Programs

  • Maple
    G:=1/2*(1-z+z^2-t*z^2-sqrt(1-z^2-2*z+2*z^3-2*z^3*t-2*z^2*t+z^4-2*z^4*t+z^4*t^2))/z^2/(z*t+1-z): Gserz:=simplify(series(G,z=0,18)): P[0]:=1: for n from 1 to 15 do P[n]:=sort(coeff(Gserz,z^n)) od: for n from 0 to 15 do seq(coeff(t*P[n],t^j),j=1..1+floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, t) option remember; `if`(y>x or y<0, 0,
          `if`(x=0, 1, expand(`if`(t, 1, z)*b(x-1, y-1, true)
          +b(x-1, y+1, false)+b(x-1, y, false))))
        end:
    T:= n->(p->seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0, false)):
    seq(T(n), n=0..20);  # Alois P. Heinz, Mar 11 2014
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y>x || y<0, 0, If[x == 0, 1, Expand[If[t, 1, z]*b[x-1, y-1, True] + b[x-1, y+1, False] + b[x-1, y, False]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[n, 0, False]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, May 22 2015, after Alois P. Heinz *)

Formula

G.f.: G(t,z) satisfies G = 1+zG+z^2[t(1+zG)+G-1-zG]G.
Showing 1-10 of 11 results. Next