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 58 results. Next

A217536 Square array read by antidiagonals, where the top row is the nonnegative integers and the other numbers are the sum of the neighbors in the preceding row.

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 3, 6, 10, 14, 4, 9, 18, 32, 46, 5, 12, 27, 55, 101, 147, 6, 15, 36, 81, 168, 315, 462, 7, 18, 45, 108, 244, 513, 975, 1437, 8, 21, 54, 135, 324, 736, 1564, 3001, 4438, 9, 24, 63, 162, 405, 973, 2222, 4761, 9199, 13637, 10, 27, 72, 189, 486, 1215, 2924, 6710, 14472, 28109, 41746
Offset: 0

Views

Author

WG Zeist, Oct 06 2012

Keywords

Comments

Each number in the top row of the array is determined by the pre-defined sequence (in this case, the nonnegative integers). Each number in lower rows is the sum of the numbers vertically or diagonally above it (so, the number at the left end of each row is the sum of two numbers, and all other numbers the sum of three).
Replacing the top row with A000012 (the all 1's sequence) and constructing the rest of the array the same way produces A062105. Similarly, replacing the top row with A000007 (a(n) = 0^n) produces A020474. - WG Zeist, Aug 24 2024
For any array constructed with this method, regardless of the sequence chosen for the top row, the sequence in the first column of the array can be computed from the sequence in the top row as follows: let a(0), a(1), a(2), ... be the terms in the top row, and b(0), b(1), b(2), ... the terms in the first column. Then b(n) = Sum_{k=0..n} A064189(n,k) * a(k). The inverse operation, to compute the top row from the first column, is given by a(n) = Sum_{k=0..n} A104562(n,k) * b(k). - WG Zeist, Aug 26 2024

Examples

			The array starts:
  0  1  2  3
  1  3  6  9
  4  10 18 27
  14 32 55 81
		

Crossrefs

Main diagonal gives A036290. First column gives A330796.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(k<0, 0,
         `if`(n=0, k, add(A(n-1, k+i), i=-1..1)))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Aug 24 2024

Formula

T(m+1,n) = sum(T(m,k), |k-n| <= 1) (and T(0,n)=n), m, n >= 0. - M. F. Hasler, Oct 09 2012

Extensions

Offset 0 from Alois P. Heinz, Aug 24 2024

A344394 a(n) = binomial(n, n/2 - 1/4 + (-1)^n/4)*hypergeom([-n/4 - 1/8 + (-1)^n/8, -n/4 + 3/8 + (-1)^n/8], [n/2 + 7/4 + (-1)^n/4], 4).

Original entry on oeis.org

1, 1, 2, 5, 9, 25, 44, 133, 230, 726, 1242, 4037, 6853, 22737, 38376, 129285, 217242, 740554, 1239980, 4266830, 7123765, 24701425, 41141916, 143567173, 238637282, 837212650, 1389206210, 4896136845, 8112107475, 28703894775, 47495492400, 168640510725, 278722764954
Offset: 0

Views

Author

Peter Luschny, May 19 2021

Keywords

Comments

Related to the Motzkin triangle A064189 counting certain lattice paths.

Crossrefs

Cf. A026300, A064189, A026302 (even bisection), A344396 (odd bisection), A327871.

Programs

  • Maple
    alias(C=binomial):
    a := n -> add(C(n, j)*(C(n - j, j + n/2 - 1/4 + (-1)^n/4) - C(n - j, j + n/2 + 7/4 + (-1)^n/4)), j = 0..n): seq(a(n), n = 0..32);
  • Mathematica
    a[n_] := Binomial[n, n/2 - 1/4 + (-1)^n/4] Hypergeometric2F1[-n/4 - 1/8 + (-1)^n/8, -n/4 + 3/8 + (-1)^n/8, n/2 + 7/4 + (-1)^n/4, 4];
    Table[a[n], {n, 0, 32}]

Formula

a(n) = Sum_{j = 0..n} C(n, j)*(C(n - j, j + n/2 - 1/4 + (-1)^n/4) - C(n - j, j + n/2 + 7/4 + (-1)^n/4)).
a(n) = A064189(n, floor(n/2)), the middle column of the Motzkin triangle.
a(n) = A026300(n, ceiling(n/2)).

A344396 a(n) = binomial(2*n + 1, n)*hypergeom([-(n + 1)/2, -n/2], [n + 2], 4).

Original entry on oeis.org

1, 5, 25, 133, 726, 4037, 22737, 129285, 740554, 4266830, 24701425, 143567173, 837212650, 4896136845, 28703894775, 168640510725, 992671051482, 5853000551090, 34562387229046, 204368928058958, 1209916827501876, 7170955214476509, 42543879586512435, 252638095187722437
Offset: 0

Views

Author

Peter Luschny, May 19 2021

Keywords

Comments

Related to the Motzkin triangle A064189 counting certain lattice paths.

Crossrefs

Programs

  • Maple
    alias(C=binomial):
    a := n -> add(C(2*n + 1, j)*(C(2*n + 1 - j, j + n) - C(2*n + 1 - j, j + n + 2)), j = 0..2*n+1): seq(a(n), n=0..23);
  • Mathematica
    a[n_] := Binomial[2 n + 1, n] Hypergeometric2F1[-(n + 1)/2, -n/2, n + 2, 4];
    Table[a[n], {n, 0, 23}]

Formula

a(n) = Sum_{j=0..2*n+1} C(2*n + 1, j)*(C(2*n + 1 - j, j + n) - C(2*n + 1 - j, j + n + 2)).
a(n) = A064189(2*n+1, n).
a(n) = A026300(2*n+1, n+1).
a(n) ~ sqrt((5242 + 18674/sqrt(13))/2187) * ((70 + 26*sqrt(13))/27)^n / sqrt(Pi*n). - Vaclav Kotesovec, May 19 2021
From Peter Bala, Aug 03 2023: (Start)
P-recursive: 3*(13*n - 4)*(3*n + 2)*(3*n + 1)*(n + 1)*a(n) = 2*(2*n + 1)*(455*n^3 + 315*n^2 - 44*n - 24)*a(n-1) + 36*(13*n + 9)*(2*n + 1)*(2*n - 1)*n*a(n-2) with a(0) = 1 and a(1) = 5.
a(n) = (1/2)*A027908(n+1). (End)

A344502 a(n) = Sum_{k=0..n} binomial(n, k)^2 * hypergeom([(k-n)/2, (k-n+1)/2], [k+2], 4).

Original entry on oeis.org

1, 2, 7, 29, 128, 587, 2759, 13190, 63844, 311948, 1535488, 7602971, 37829455, 188989166, 947399951, 4763280965, 24009574400, 121291129748, 613939110308, 3112989719080, 15809048927000, 80397234851080, 409378690617344, 2086928493438299, 10649867701045871
Offset: 0

Views

Author

Peter Luschny, May 23 2021

Keywords

Comments

Binomial convolution of the Motzkin numbers.

Crossrefs

Cf. A064189 (Motzkin numbers), A344503.
Cf. A348840.

Programs

  • Maple
    a := n -> add(binomial(n, k)^2 * hypergeom([(k-n)/2, (k-n+1)/2], [k+2], 4), k = 0..n); seq(simplify(a(n)), n = 0..24);

Formula

a(n) ~ sqrt((76 + 5*(38*(247 - 27*sqrt(57)))^(1/3) + 5*(38*(247 + 27*sqrt(57)))^(1/3))/57)/4 * ((1261 + 57*sqrt(57))^(1/3)/6 + 56/(3*(1261 + 57*sqrt(57))^(1/3)) + 5/3)^n / sqrt(Pi*n). - Vaclav Kotesovec, May 24 2021
Conjecture D-finite with recurrence -4*(3035*n-11997) *(2*n+1) *(n+1) *a(n) +2*(153546*n^3-490325*n^2-62942*n+71982) *a(n-1) +2*(-452090*n^3+1745622*n^2-1405285*n-226200) *a(n-2) -2 *(n-2)*(83741*n^2-200458*n-19650) *a(n-3) -3*(n-2) *(n-3) *(46423*n+6938) *a(n-4)=0. - R. J. Mathar, Nov 02 2021

A344506 a(n) = [x^n] 2 / (1 - 7*x + sqrt(1 - 2*x - 3*x^2)).

Original entry on oeis.org

1, 4, 17, 73, 315, 1362, 5895, 25528, 110579, 479068, 2075683, 8993897, 38971621, 168871854, 731764089, 3170939841, 13740635787, 59542470588, 258016586955, 1118069698011, 4844962624953, 20994821090790, 90977510544237, 394235745437286, 1708354520308101
Offset: 0

Views

Author

Peter Luschny, May 23 2021

Keywords

Comments

The Motzkin polynomials (coefficients in A064189) evaluated at x = 3.

Crossrefs

The Motzkin polynomials evaluated at: x = 0 (A001006), x = 1 (A005773), x = 2 (A059738), x = 3 (this sequence).

Programs

  • Maple
    gf := 2 / (1 - 7*x + sqrt(1 - 2*x - 3*x^2)):
    ser := series(gf, x, 27): seq(coeff(ser, x, n), n=0..25);
    # Or:
    rgf := (3*x^2 + x)/(13*x^2 + 7*x + 1):
    subsop(1 = NULL, gfun:-seriestolist(series(rgf, x, 28), 'revogf'));
  • Mathematica
    RecurrenceTable[{a[n] == (39 (2 - n) a[n - 3] - (17 n + 5) a[n - 2] + (19 n + 10) a[n - 1])/(3 n + 3), a[0] == 1, a[1] == 4, a[2] == 17}, a, {n, 0, 26}]
  • SageMath
    R. = PowerSeriesRing(QQ, default_prec=25)
    f = (3*x^2 + x) / (13*x^2 + 7*x + 1)
    f.reverse().shift(-1).list()

Formula

a(n) = [x^n] reverse((3*x^2 + x) / (13*x^2 + 7*x + 1)) / x.
a(n) = Sum_{k=0..n} 3^k*binomial(n, k)*hypergeom([(k-n)/2, (k-n+1)/2], [k+2], 4).
a(n) = (39*(2 - n)*a(n - 3) - (17*n + 5)*a(n - 2) + (19*n + 10)*a(n - 1))/(3*n + 3) for n >= 3.
a(n) ~ 8 * 13^n / 3^(n+2). - Vaclav Kotesovec, May 24 2021
G.f.: 1/(1 - 4*x - x^2/(1 - x - x^2/(1 - x - x^2/(1 - x - x^2/(1 - ...))))), a continued fraction. - Ilya Gutkovskiy, Nov 19 2021

A379838 Triangle read by rows: T(n,k) is the total number of humps with height k in all Motzkin paths of order n, n >= 2 and 1 <= k <= n/2.

Original entry on oeis.org

1, 3, 8, 1, 20, 5, 50, 19, 1, 126, 63, 7, 322, 196, 34, 1, 834, 588, 138, 9, 2187, 1728, 507, 53, 1, 5797, 5016, 1749, 253, 11, 15510, 14454, 5786, 1067, 76, 1, 41834, 41470, 18590, 4147, 416, 13, 113633, 118690, 58487, 15223, 1976, 103, 1, 310571, 339274, 181181, 53599, 8528, 635, 15
Offset: 2

Views

Author

Xiaomei Chen, Jan 04 2025

Keywords

Examples

			Triangle begins:
   [2]     1;
   [3]     3;
   [4]     8,    1;
   [5]    20,    5;
   [6]    50,   19,   1;
   [7]   126,   63,   7;
   [8]   322,  196,  34,  1;
   [9]   834,  588, 138,  9;
  [10]  2187, 1728, 507, 53, 1;
  ...
		

Crossrefs

Row lengths give A004526.
Row sums give A097861.
Column 1 gives A140662.
Cf. A064189.

Programs

  • Sage
    def A379838_triangel(dim):
        M = matrix(ZZ, dim, dim)
        for n in (2..dim+1):
            for k in (1..math.floor(n/2)+1):
                for i in range(n-2*k+1):
                    if ((n-i)%2)==0:
                        M[n-2,k-1]=M[n-2, k-1]+(4*k)/(n-i+2*k)*binomial(n,i)*binomial(n-i-1,(n-i)/2+k-1)
        return M

Formula

G.f.: Sum_{n>=2, k>=1} T(n,k) * x^n * y^k = x^2 * M^2(x) * y / ((1-x) * (1 - x^2 * M^2(x) * y)), where M(x) is the g.f. for A001006.
T(n,k) = Sum_{i=0..n-2*k, i==n (mod 2)} (4*k) / (n-i+2*k) * binomial(n,i) * binomial(n-i-1,(n-i)/2+k-1).
T(n,k) = Sum_{i=2k-1..n-1} A064189(i,2k-1).
T(n,k) + T(n,k+1) = A064189(n,2k).

A064191 Triangle T(n,k) (n >= 0, 0 <= k <= n) generalizing Motzkin numbers.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 4, 2, 2, 1, 9, 4, 5, 2, 1, 21, 9, 12, 5, 3, 1, 51, 21, 30, 12, 9, 3, 1, 127, 51, 76, 30, 25, 9, 4, 1, 323, 127, 196, 76, 69, 25, 14, 4, 1, 835, 323, 512, 196, 189, 69, 44, 14, 5, 1, 2188, 835, 1353, 512, 518, 189, 133, 44, 20, 5, 1, 5798, 2188, 3610, 1353
Offset: 0

Views

Author

N. J. A. Sloane, Sep 21 2001

Keywords

Comments

This triangle appears on page 9 of the linked reference and is defined by Corollary 2.4.
A number triangle with repeated columns of A064189. Production matrix is A070909 (without first term). - Philippe Deléham, Dec 02 2009

Examples

			Triangle begins
  1;
  1, 1;
  2, 1, 1;
  4, 2, 2, 1; ...
		

Crossrefs

First column gives A001006.

Formula

T(n, 0) = Sum_{k=0..n-1} T(n-1, k). For k even, 0 < k <= n, T(n, k) = Sum_{j=k-1..n-1} T(n-1, j). For k odd, 0 < k <= n, T(n, k) = T(n-1, k-1). - David Wasserman, Jul 15 2002

Extensions

More terms from David Wasserman, Jul 15 2002

A171505 Riordan array (f(x), x*f(x)) where f(x) is the g.f. of A059738.

Original entry on oeis.org

1, 3, 1, 10, 6, 1, 34, 29, 9, 1, 117, 128, 57, 12, 1, 405, 538, 309, 94, 15, 1, 1407, 2192, 1533, 604, 140, 18, 1, 4899, 8740, 7179, 3453, 1040, 195, 21, 1, 17083, 34296, 32278, 18264, 6730, 1644, 259, 24, 1, 59629, 132929, 140790, 91372, 39668, 11877, 2443
Offset: 0

Views

Author

Philippe Deléham, Dec 10 2009

Keywords

Comments

Equal to B*A096164 = A171488*B, B=A007318.

Examples

			Triangle begins :
1 ;
3, 1 ;
10, 6, 1 ;
34, 29, 9, 1 ;
117, 128, 57, 12, 1 ; ...
		

Crossrefs

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = A005043(n), A001006(n), A005773(n+1), A059738(n) for x = -3, -2, -1, 0 respectively.
T(n,k) = T(n-1,k-1) + 3*T(n-1,k) + sum_{i, i>=0} T(n-1,k+1+i)*(-2)^i. - Philippe Deléham, Feb 23 2012

A238763 A Motzkin triangle read by rows, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 0, 2, 0, 4, 1, 0, 5, 0, 9, 0, 3, 0, 12, 0, 21, 1, 0, 9, 0, 30, 0, 51, 0, 4, 0, 25, 0, 76, 0, 127, 1, 0, 14, 0, 69, 0, 196, 0, 323, 0, 5, 0, 44, 0, 189, 0, 512, 0, 835, 1, 0, 20, 0, 133, 0, 518, 0, 1353, 0, 2188, 0, 6, 0, 70, 0, 392, 0, 1422, 0
Offset: 0

Views

Author

Peter Luschny, Mar 05 2014

Keywords

Comments

Similar to A020474 but with a different enumeration.
Compare with the definition of the generalized ballot numbers A238762.

Examples

			[n\k 0  1  2   3  4   5   6   7]
[0]  1,
[1]  0, 1,
[2]  1, 0, 2,
[3]  0, 2, 0, 4,
[4]  1, 0, 5, 0, 9,
[5]  0, 3, 0, 12, 0, 21,
[6]  1, 0, 9, 0, 30, 0, 51,
[7]  0, 4, 0, 25, 0, 76, 0, 127.
		

Crossrefs

Programs

  • Sage
    @CachedFunction
    def T(p, q):
        if p == 0 and q == 0: return 1
        if p < 0 or  p > q: return 0
        return T(p-2, q) + T(p-1, q-1) + T(p, q-2)
    [[T(p, q) for p in (0..q)] for q in (0..9)]

Formula

Definition: T(0, 0) = 1; T(p, q) = 0 if p < 0 or p > q; T(p, q) = T(p-2, q) + T(p-1, q-1) + T(p, q-2). (The notation is in the style of Knuth, TAOCP 4a (7.2.1.6)).
T(n, n) = A001006(n).
Sum_{0<=k<=n} T(n, k) = A005043(n+2).

A301475 Triangular array of polynomials related to the Motzkin triangle and to rooted polyominoes, coefficients in ascending order, read by rows, for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 4, 5, 3, 1, 5, 3, 1, 3, 1, 1, 9, 12, 9, 4, 1, 12, 9, 4, 1, 9, 4, 1, 4, 1, 1, 21, 30, 25, 14, 5, 1, 30, 25, 14, 5, 1, 25, 14, 5, 1, 14, 5, 1, 5, 1, 1, 51, 76, 69, 44, 20, 6, 1, 76, 69, 44, 20, 6, 1, 69, 44, 20, 6, 1, 44, 20, 6, 1, 20, 6, 1, 6, 1, 1
Offset: 0

Views

Author

Peter Luschny, Mar 22 2018

Keywords

Comments

Evaluating this triangle of polynomials at different values of x leads to interesting integer triangles. For instance at x = 0 it gives the Motzkin triangle A064189 (A026300), at x = 1 it counts rooted polyominoes A038622; at x = 2 it gives A126954 and at x =-1 gives A089942; x = 1/2 and scaling gives A301477.

Examples

			Triangle of polynomials starts:
                                    1
                                 1 + x, 1
                          2 + 2 x + x^2, 2 + x, 1
               4 + 5 x + 3 x^2  + x^3, 5 + 3 x^2 + x, 3 + x, 1
9 + 12 x + 9 x^2  + 4 x^3  + x^4, 12 + 9 x + 4 x^2 + x^3, 9 + 4 x + x^2, 4 + x, 1
.
Triangle of coefficients starts:
                               1
                            1, 1, 1
                        2, 2, 1, 2, 1, 1
                  4, 5, 3, 1, 5, 3, 1, 3, 1, 1
         9, 12, 9, 4, 1, 12, 9, 4, 1, 9, 4, 1, 4, 1, 1
21, 30, 25, 14, 5, 1, 30, 25, 14, 5, 1, 25, 14, 5, 1, 14, 5, 1, 5, 1, 1
		

Crossrefs

Cf. A064189 (A026300) (x=0), A038622 (x=1), A126954 (x=2), A089942 (x=-1), A301477 (x=1/2, scaled).
Cf. A000244 (row sums), A000217 (row length).

Programs

  • Maple
    CoeffList := p -> op(PolynomialTools:-CoefficientList(p, x)):
    T := (n,k) -> binomial(n,k)*hypergeom([-k/2,1/2-k/2], [-k+n+2], 4);
    P := (n,m) -> add(simplify(T(n,k)*x^(n-k-m)), k=0..n-m);
    for n from 0 to 5 do seq(sort(P(n,j),x,ascending), j=0..n) od;
    for n from 0 to 5 do seq(CoeffList(P(n,j)), j=0..n) od;

Formula

P(n,k) = Sum_{j=0..n-k}binomial(n,j)*hypergeom([-j/2,1/2-j/2],[n-j+2],4)*x^(n-j-k).
T(n,k) is the list of the coefficients of P(n,k) in ascending order.
Row sums are powers of 3, row lengths are the triangular numbers.
Previous Showing 41-50 of 58 results. Next