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

A084610 Triangle, read by rows, where the n-th row lists the (2n+1) coefficients of (1+x-x^2)^n.

Original entry on oeis.org

1, 1, 1, -1, 1, 2, -1, -2, 1, 1, 3, 0, -5, 0, 3, -1, 1, 4, 2, -8, -5, 8, 2, -4, 1, 1, 5, 5, -10, -15, 11, 15, -10, -5, 5, -1, 1, 6, 9, -10, -30, 6, 41, -6, -30, 10, 9, -6, 1, 1, 7, 14, -7, -49, -14, 77, 29, -77, -14, 49, -7, -14, 7, -1, 1, 8, 20, 0, -70, -56, 112, 120, -125, -120, 112, 56, -70, 0, 20, -8, 1
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Examples

			Rows:
  1;
  1, 1, -1;
  1, 2, -1,  -2,   1;
  1, 3,  0,  -5,   0,   3, -1;
  1, 4,  2,  -8,  -5,   8,  2,  -4,   1;
  1, 5,  5, -10, -15,  11, 15, -10,  -5,   5, -1;
  1, 6,  9, -10, -30,   6, 41,  -6, -30,  10,  9, -6,   1;
  1, 7, 14,  -7, -49, -14, 77,  29, -77, -14, 49, -7, -14, 7, -1;
		

Crossrefs

Programs

  • Magma
    A084610:= func< n,k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*(-1)^j: j in [0..k]]) >;
    [A084610(n,k): k in [0..2*n], n in [0..13]]; // G. C. Greubel, Mar 26 2023
    
  • Mathematica
    T[n_, k_]:= Sum[Binomial[n,k-j]*Binomial[k-j,j]*(-1)^j, {j,0,k}];
    Table[T[n, k], {n,0,12}, {k,0,2*n}]//Flatten (* G. C. Greubel, Mar 26 2023 *)
  • PARI
    for(n=0,12, for(k=0,2*n,t=polcoeff((1+x-x^2)^n,k,x); print1(t",")); print(" "))
    
  • SageMath
    def A084610(n,k): return sum(binomial(n,k-j)*binomial(k-j,j)*(-1)^j for j in range(k+1))
    flatten([[A084610(n,k) for k in range(2*n+1)] for n in range(14)]) # G. C. Greubel, Mar 26 2023

Formula

G.f.: G(0)/2 , where G(k)= 1 + 1/( 1 - (1+x-x^2)*x^(2*k+1)/((1+x-x^2)*x^(2*k+1) + 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 06 2013
From G. C. Greubel, Mar 26 2023: (Start)
T(n, k) = Sum_{j=0..k} binomial(n, k-j)*binomial(k-j, j)*(-1)^j.
T(n, 2*n) = (-1)^n.
T(n, 2*n-1) = (-1)^(n-1)*n, n >= 1.
Sum_{k=0..2*n} T(n, k) = 1.
Sum_{k=0..2*n} (-1)^k*T(n, k) = (-1)^n.
Sum_{k=0..n} T(n-k, k) = floor((n+2)/2).
Sum_{k=0..n} (-1)^k*T(n-k, k) = (-1)^n*A057597(n+2). (End)

A084603 Coefficients of 1/sqrt(1 - 2*x - 11*x^2); also, a(n) is the central coefficient of (1 + x + 3*x^2)^n.

Original entry on oeis.org

1, 1, 7, 19, 91, 331, 1441, 5797, 24739, 103411, 441397, 1876777, 8047909, 34533253, 148803487, 642228139, 2778852979, 12043194163, 52286516821, 227323871929, 989675651041, 4313712072241, 18822940658947, 82215245701519
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Comments

5th binomial transform of 2^n*LegendreP(n,-2) (signed version of A069835). - Paul Barry, Sep 03 2004
Also number of paths from (0,0) to (n,0) using steps U=(1,1), H=(1,0) and D=(1,-1), the U (or D) steps come in three colors. - N-E. Fahssi, Feb 05 2008
Diagonal of the rational function 1 / (1 - 3*x^2 - y^2 - x*y). - Ilya Gutkovskiy, Apr 22 2025

Crossrefs

Programs

  • Mathematica
    Table[Sum[Binomial[n-k,k]*Binomial[n,k]*3^k,{k,0,Floor[n/2]}],{n,0,20}] (* Vaclav Kotesovec, Oct 14 2012 *)
  • PARI
    for(n=0,30,t=polcoeff((1+x+3*x^2)^n,n,x); print1(t","))

Formula

a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*binomial(n, k)3^k. - Paul Barry, Aug 26 2004
Binomial transform is A084609. Hankel transform is 6^n*3^C(n,2). - Paul Barry, Sep 16 2006
a(n) = (1/Pi)*Integral_{x=1-2*sqrt(3)..1+2*sqrt(3)} x^n/sqrt(-x^2 + 2*x + 11). - Paul Barry, Sep 16 2006
From Paul Barry, Sep 16 2006: (Start)
a(n) = Sum_{k=0..floor(n/2)} C(n,2k)*C(2k,k)*3^k;
a(n) = Sum_{k=0..floor(n/2)} C(n,k)*C(n-k,k)*3^k. (End)
From N-E. Fahssi, Feb 05 2008: (Start)
a(n) is also the central coefficient of (3+x+x^2)^n;
a(n) = Sum_{k=0..n} 2^(n-k)*C(n,k)*T(k,n), where T(k,n) is the triangle of trinomial coefficients = coefficient of x^n of (1+x+x^2)^k: A027907. (End)
D-finite with recurrence: a(n+2) = ( (2*n+3)*a(n+1) + 11*(n+1)*a(n) )/(n+2); a(0)=a(1)=1. - Sergei N. Gladkovskii, Aug 01 2012
a(n) ~ sqrt(18+3*sqrt(3))*(1+2*sqrt(3))^n/(6*sqrt(Pi*n)). - Vaclav Kotesovec, Oct 14 2012
E.g.f.: exp(x)*BesselI(0, 2*sqrt(3)*x). - Paul D. Hanna, Nov 09 2014, after Vladeta Jovovic in A084601
From Peter Bala, Jan 07 2022: (Start)
O.g.f. A(x) = 1 + x*d/dx(log(B(x))), where B(x) = (1 - x - sqrt(1 - 2*x - 11*x^2))/(6*x^2) is the o.g.f. of A025237.
The Gauss congruences a(n*p^k) == a(n^p^(k-1)) (mod p^k) hold for prime p and positive integers n and k. (End)

A122868 Expansion of 1/sqrt(1-6x-3x^2).

Original entry on oeis.org

1, 3, 15, 81, 459, 2673, 15849, 95175, 576963, 3523257, 21640365, 133549155, 827418645, 5143397535, 32063180535, 200367960201, 1254816463923, 7873205412825, 49482344889261, 311457546052659, 1963051327342449, 12387750763156227, 78258731003169435
Offset: 0

Views

Author

Paul Barry, Sep 16 2006

Keywords

Comments

Binomial transform of A084609. Central coefficients of (1+3x+3x^2)^n.
The number of free (3,3)-Motzkin paths of length n, where free (k,t)-Motzkin paths are the free Motzkin paths with level steps of weight k and down steps of weight t. For example a(2)=15 because there are 9, 3, 3 paths consisting of two level steps, UD's and DU's, respectively. - Carol J. Wang (cerlined7(AT)hotmail.com), Nov 27 2007
The Gauss congruences a(n*p^k) == a(n^p^(k-1)) (mod p^k) hold for prime p and positive integers n and k. - Peter Bala, Jan 07 2022

Crossrefs

Top row of array in A232973.

Programs

  • Maple
    b:= proc(x, y) option remember; `if`([x, y]=[0$2], 1,
          `if`(x>0, add(b(x-1, y+j), j=-1..1), 0)+
          `if`(y>0, b(x, y-1), 0)+`if`(y<0, b(x, y+1), 0))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..23);  # Alois P. Heinz, Sep 21 2021
    r := (-3)^(1/2): seq(simplify(r^n*LegendreP(n, -r)), n=0..10); # Mark van Hoeij, Nov 13 2022
  • Mathematica
    CoefficientList[Series[1/Sqrt[1-6*x-3*x^2], {x, 0, 20}], x] (* Vaclav Kotesovec, Oct 19 2012 *)
  • Maxima
    a(n):=coeff(expand((1+3*x+3*x^2)^n),x,n);
    makelist(a(n),n,0,12);
    
  • PARI
    my(x = 'x + O('x^30)); Vec(1/sqrt(1-6*x-3*x^2)) \\ Michel Marcus, Jan 29 2016

Formula

a(n) = Sum_{k=0..floor(n/2)} C(n,2k)*C(2k,k)*3^(n-k).
E.g.f. : exp(3x)*Bessel_I(0,2*sqrt(3)x).
D-finite with recurrence: n*a(n) + 3*(1-2*n)*a(n-1) + 3*(1-n)*a(n-2) = 0. - R. J. Mathar, Nov 14 2011 [proved in Belbachir et al. (see Table 1)]
a(n) ~ (1+sqrt(3))*(3+2*sqrt(3))^n/(2*sqrt(2*Pi*n)). - Vaclav Kotesovec, Oct 19 2012
a(n) = (-3)^(n/2)*LegendreP(n, -(-3)^(1/2)). - Mark van Hoeij, Nov 13 2022

A328347 Number T(n,k) of n-step walks on cubic lattice starting at (0,0,0), ending at (0,k,n-k) and using steps (0,0,1), (0,1,0), (1,0,0), (-1,1,1), (1,-1,1), and (1,1,-1); triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 3, 4, 3, 7, 15, 15, 7, 19, 52, 72, 52, 19, 51, 175, 300, 300, 175, 51, 141, 576, 1185, 1480, 1185, 576, 141, 393, 1869, 4473, 6685, 6685, 4473, 1869, 393, 1107, 6000, 16380, 28392, 33880, 28392, 16380, 6000, 1107, 3139, 19107, 58572, 115332, 159264, 159264, 115332, 58572, 19107, 3139
Offset: 0

Views

Author

Alois P. Heinz, Oct 13 2019

Keywords

Comments

These walks are not restricted to the first (nonnegative) octant.

Examples

			Triangle T(n,k) begins:
     1;
     1,    1;
     3,    4,     3;
     7,   15,    15,     7;
    19,   52,    72,    52,    19;
    51,  175,   300,   300,   175,    51;
   141,  576,  1185,  1480,  1185,   576,   141;
   393, 1869,  4473,  6685,  6685,  4473,  1869,  393;
  1107, 6000, 16380, 28392, 33880, 28392, 16380, 6000, 1107;
  ...
		

Crossrefs

Columns k=0-1 give: A002426, A132894 = n*A005773(n).
Row sums give A084609.
T(2n,n) gives A328426.

Programs

  • Maple
    b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(add(
          add(`if`(i+j+k=1, (h-> `if`(add(t, t=h)<0, 0, b(h)))(
          sort(l-[i, j, k])), 0), k=r), j=r), i=r))([$-1..1]))
        end:
    T:= (n, k)-> b(sort([0, k, n-k])):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    b[l_List] := b[l] = If[l[[-1]] == 0, 1, Sum[If[i + j + k == 1, Function[h, If[Total[h] < 0, 0, b[h]]][Sort[l - {i, j, k}]], 0], {i, {-1, 0, 1}}, {j, {-1, 0, 1}}, {k, {-1, 0, 1}}]];
    T[n_, k_] := b[Sort[{0, k, n - k}]];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 30 2020, after Alois P. Heinz *)

Formula

T(n,k) = T(n,n-k).

A084608 Triangle, read by rows, where the n-th row lists the (2n+1) coefficients of (1+2*x+3*x^2)^n.

Original entry on oeis.org

1, 1, 2, 3, 1, 4, 10, 12, 9, 1, 6, 21, 44, 63, 54, 27, 1, 8, 36, 104, 214, 312, 324, 216, 81, 1, 10, 55, 200, 530, 1052, 1590, 1800, 1485, 810, 243, 1, 12, 78, 340, 1095, 2712, 5284, 8136, 9855, 9180, 6318, 2916, 729, 1, 14, 105, 532, 2009, 5922, 13993, 26840, 41979
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Examples

			Triangle begins:
  1;
  1,  2,  3;
  1,  4, 10,  12,   9;
  1,  6, 21,  44,  63,   54,   27;
  1,  8, 36, 104, 214,  312,  324,  216,   81;
  1, 10, 55, 200, 530, 1052, 1590, 1800, 1485, 810, 243;
		

Crossrefs

Programs

  • Haskell
    a084608 n = a084608_list !! n
    a084608_list = concat $ iterate ([1,2,3] *) [1]
    instance Num a => Num [a] where
       fromInteger k = [fromInteger k]
       (p:ps) + (q:qs) = p + q : ps + qs
       ps + qs         = ps ++ qs
       (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
        *                = []
    -- Reinhard Zumkeller, Apr 02 2011
    
  • Magma
    A084608:= func< n,k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*2^(k-2*j)*3^j: j in [0..k]]) >;
    [A084608(n,k): k in [0..2*n], n in [0..13]]; // G. C. Greubel, Mar 27 2023
    
  • Maple
    f:= proc(n) option remember; expand((1+2*x+3*x^2)^n) end:
    T:= (n,k)-> coeff(f(n), x, k):
    seq(seq(T(n, k), k=0..2*n), n=0..10);  # Alois P. Heinz, Apr 03 2011
  • Mathematica
    row[n_] := (1+2x+3x^2)^n + O[x]^(2n+1) // CoefficientList[#, x]&; Table[row[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Feb 01 2017 *)
  • PARI
    for(n=0,10, for(k=0,2*n,t=polcoeff((1+2*x+3*x^2)^n,k,x); print1(t",")); print(" "))
    
  • SageMath
    def A084608(n,k): return sum(binomial(n,j)*binomial(n-j,k-2*j)*2^(k-2*j)*3^j for j in range(k//2+1))
    flatten([[A084608(n,k) for k in range(2*n+1)] for n in range(14)]) # G. C. Greubel, Mar 27 2023

Formula

From G. C. Greubel, Mar 27 2023: (Start)
T(n, k) = Sum_{j=0..k} binomial(n, k-j)*binomial(k-j, j)*2^(k-2*j)*3^j.
T(n, n) = A084609(n).
T(n, 2*n-1) = A212697(n), n >= 1.
T(n, 2*n) = A000244(n).
Sum_{j=0..2*n} T(n, k) = A000400(n).
Sum_{k=0..2*n} (-1)^k*T(n, k) = A000079(n).
Sum_{k=0..n} T(n-k, k) = A101822(n). (End)

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

Original entry on oeis.org

1, 2, 12, 56, 304, 1632, 9024, 50304, 283392, 1607168, 9167872, 52537344, 302239744, 1744412672, 10096263168, 58576306176, 340566147072, 1983765676032, 11574393962496, 67631502065664, 395710949228544, 2318088492023808, 13594307705438208, 79802741538422784, 468895276304695296
Offset: 0

Views

Author

Paul Barry, Sep 08 2004

Keywords

Comments

Central coefficient of (1 + 2x + 4x^2)^n.
a(n) is the number of paths from (0,0) to (n,0) using steps U=(1,1), H=(1,0) and D=(1,-1), the H steps can have 2 colors and the U steps can have 4 colors. - N-E. Fahssi, Mar 31 2008
a(n) is the number of 2 X n matrices with terms in {1,2,3}, same number of 1's in top and bottom rows, and no constant columns. For example, a(1)=2 counts the transposes of (2,3) and (3,2). The number of such matrices with k 1's in each row is binomial(n,2k) [choose columns containing 1's] * binomial(2k,k) [place 1's in these columns] * 2^n [place 2 or 3 in the topmost available spot in each column and the other of 2,3 in the other spot if not occupied by a 1]. - David Callan, Aug 25 2009

Crossrefs

Programs

  • Maple
    seq(simplify((-2)^n*hypergeom([-n,1/2], [1], 4)),n=0..20); # Peter Luschny, Apr 26 2016
    T := proc(n, k) option remember;
    if n < 0 or k < 0 then 0
    elif n = 0 then binomial(2*k, k)
    else 2*(T(n-1, k+1) - T(n-1, k)) fi end:
    a := n -> T(n, 0): seq(a(n), n=0..20); # Peter Luschny, Aug 23 2017
  • Mathematica
    Table[SeriesCoefficient[1/Sqrt[1-4*x-12*x^2],{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 15 2012 *)
  • PARI
    x='x+O('x^66); Vec(1/sqrt(1-4*x-12*x^2)) \\ Joerg Arndt, May 11 2013

Formula

G.f.: 1/sqrt((1+2*x)*(1-6*x)).
E.g.f.: exp(2*x)*BesselI(0, 4*x).
a(n) = Sum_{k=0..floor(n/2)} binomial(n, k)*binomial(2*(n-k), n)*3^k.
D-finite with recurrence: a(n+2) = ((4*n+6)*a(n+1) + 12*(n+1)*a(n))/(n+2); a(0)=1, a(1)=2. - Sergei N. Gladkovskii, Jul 30 2012
a(n) ~ sqrt(3)*6^n/(2*sqrt(Pi*n)). - Vaclav Kotesovec, Oct 15 2012
G.f.: G(0), where G(k) = 1 + 2*x*(1+3*x)*(4*k+1)/( 2*k+1 - x*(1+3*x)*(2*k+1)*(4*k+3)/(x*(1+3*x)*(4*k+3) + (k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jun 30 2013
a(n) = (-2)^n*hypergeom([-n,1/2], [1], 4). - Peter Luschny, Apr 26 2016
a(n) = 2^n*GegenbauerC(n, -n, -1/2). - Peter Luschny, May 08 2016

A374599 Expansion of 1/sqrt(1 - 4*x - 8*x^4).

Original entry on oeis.org

1, 2, 6, 20, 74, 276, 1044, 3992, 15414, 59948, 234484, 921432, 3634916, 14386248, 57097704, 227166384, 905714150, 3617851980, 14475452484, 58004111160, 232737175404, 934969613528, 3760157234584, 15137340947280, 60994657996476, 245980435701752
Offset: 0

Views

Author

Seiichi Manyama, Jul 13 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(1/sqrt(1-4*x-8*x^4))
    
  • PARI
    a(n) = sum(k=0, n\4, 2^k*binomial(n-3*k, k)*binomial(2*(n-3*k), n-3*k));

Formula

a(n) = Sum_{k=0..floor(n/4)} 2^k * binomial(n-3*k,k) * binomial(2*(n-3*k),n-3*k).
n*a(n) = 2*(2*n-1)*a(n-1) + 4*(2*n-4)*a(n-4).

A374598 Expansion of 1/sqrt(1 - 4*x - 8*x^3).

Original entry on oeis.org

1, 2, 6, 24, 94, 372, 1508, 6192, 25638, 106908, 448356, 1889040, 7989676, 33902504, 144259944, 615330784, 2630199942, 11263613484, 48315367076, 207556060816, 892819376964, 3845161246424, 16578320962104, 71548426931616, 309070048163676, 1336223562436632
Offset: 0

Views

Author

Seiichi Manyama, Jul 13 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(1/sqrt(1-4*x-8*x^3))
    
  • PARI
    a(n) = sum(k=0, n\3, 2^k*binomial(n-2*k, k)*binomial(2*(n-2*k), n-2*k));

Formula

a(n) = Sum_{k=0..floor(n/3)} 2^k * binomial(n-2*k,k) * binomial(2*(n-2*k),n-2*k).
n*a(n) = 2*(2*n-1)*a(n-1) + 4*(2*n-3)*a(n-3).

A110135 Square array of expansions of 1/sqrt(1-4x-4*k*x^2), read by antidiagonals.

Original entry on oeis.org

1, 2, 1, 6, 2, 1, 20, 8, 2, 1, 70, 32, 10, 2, 1, 252, 136, 44, 12, 2, 1, 924, 592, 214, 56, 14, 2, 1, 3432, 2624, 1052, 304, 68, 16, 2, 1, 12870, 11776, 5284, 1632, 406, 80, 18, 2, 1, 48620, 53344, 26840, 9024, 2332, 520, 92, 20, 2, 1, 184756, 243392, 137638, 50304
Offset: 0

Views

Author

Paul Barry, Jul 13 2005

Keywords

Comments

Column k has g.f. 1/sqrt(1-4x-4*k*x^2) and e.g.f. exp(2x)BesselI(0,2*sqrt(k)x). Columns include A000984, A006139, A084609, A098453. Row sums of triangle are A110136. Diagonal sums of triangle are A110137.

Examples

			As a square array, rows start
    1,   1,    1,    1,    1, ...
    2,   2,    2,    2,    2, ...
    6,   8,   10,   12,   14,   16, ...
   20,  32,   44,   56,   68,   80, ...
   70, 136,  214,  304,  406,  520, ...
  252, 592, 1052, 1632, 2332, 3152, ...
As a number triangle, rows start
    1;
    2,   1;
    6,   2,   1;
   20,   8,   2,   1;
   70,  30,  10,   2,   1;
  252, 136,  44,  12,   2,   1;
		

Formula

Square array T(n, k) = Sum_{j=0..floor(n/2)} C(n, j)*C(2(n-j), n)*k^j.
Number triangle T1(n, k) = Sum_{j=0..floor((n-k)/2)} C(n-k, j)*C(2(n-k-j), n-k)*k^j;

A098460 Expansion of e.g.f. 1/sqrt(1-2x-2x^2).

Original entry on oeis.org

1, 1, 5, 33, 321, 3945, 59445, 1056825, 21677985, 503799345, 13084021125, 375524312625, 11803392302625, 403235809601625, 14876913457531125, 589498927632239625, 24969077812488434625, 1125803018759825030625
Offset: 0

Views

Author

Paul Barry, Sep 08 2004

Keywords

Crossrefs

Cf. A012244.

Programs

  • Mathematica
    CoefficientList[Series[1/Sqrt[1-2*x-2*x^2], {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Jun 26 2013 *)
  • PARI
    my(x='x+O('x^25)); Vec(serlaplace(1/sqrt(1-2*x-2*x^2))) \\ Michel Marcus, May 10 2020

Formula

a(n) = (n!/2^n)*A084609(n);
a(n) = (n!/2^n) * Sum_{k=0..floor(n/2)} binomial(n,k)*binomial(2(n-k),n)*2^k;
a(n) = n! * Sum_{k=0..floor(n/2)} binomial(n,k)*binomial(2(n-k),n)*2^(k-n).
D-finite with recurrence: a(n) +(1-2*n)*a(n-1) -2*(n-1)^2*a(n-2)=0. - R. J. Mathar, Nov 15 2011
a(n) ~ 2^(n+1/2)*n^n/(sqrt(3-sqrt(3))*exp(n)*(sqrt(3)-1)^n). - Vaclav Kotesovec, Jun 26 2013
Showing 1-10 of 11 results. Next