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 31-40 of 87 results. Next

A049124 Revert transform of (-1 + x + x^2)/((x - 1)*(x + 1)).

Original entry on oeis.org

1, 1, 2, 6, 20, 71, 264, 1015, 4002, 16094, 65758, 272208, 1139182, 4811807, 20487096, 87832558, 378846620, 1642851797, 7158220968, 31323340342, 137595355130, 606533278416, 2682157911032, 11895267124841, 52895679368820, 235792891885786, 1053475824902774
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of ways to dissect a convex (n+2)-gon with non-crossing diagonals so that no 2m-gons (m > 1) appear. - Len Smiley
Number of even trees (i.e., ordered trees in which all nodes have even outdegree) with n+1 leaves. - Emeric Deutsch, Mar 06 2002
a(n) is the number of permutations on [n-1] in which the last 2 entries of each 321 pattern are adjacent in position. For example, a(5)=20 counts all permutations on [4] except 3241, 4231, 4312, 4321, the first, for instance because the 2 and 1 are not adjacent. - David Callan, Jul 20 2005
a(n) is the number of directed diagonally convex polyominoes with perimeter 2*n (this holds for every n > 1). - Svjetlan Feretic, Jul 11 2016
From Colin Defant, Sep 17 2018: (Start)
Let L(u,v) be the set of integer partitions whose Young diagrams fit inside a u by v rectangle. Given lambda in L(u,v), let E(lambda) be the number of partitions whose Young diagrams fit inside the Young diagram of lambda. Also, for 1 <= i <= v, let x_i(lambda)-1 be the number of parts of lambda of length v+1-i. Let x_{v+1}(lambda) = u+v+1-Sum_{i=1..v} x_i(lambda) so that (x_1(lambda),..., x_{v+1}(lambda)) is a composition of u+v+1 into v+1 parts. Let F(lambda) = Product_{i=1..v+1} Catalan(x_i(lambda)). We have a(n) = Sum_{k=0..n-2} Sum_{lambda in L(n-2k-2)} E(lambda) * F(lambda).
a(n) is the number of permutations of [n-1] that avoid the patterns 2341, 3241, 3412, and 3421.
a(n) is the number of permutations pi of [n-1] such that s(pi) avoids the patterns 231, 312, and 321, where s is West's stack-sorting map. (End)
a(n) is the number of permutations of length n avoiding the partially ordered pattern (POP) {4>1, 1>2} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the fourth element is larger than the first element, which in turn is larger than the second element. - Sergey Kitaev, Dec 09 2020

Examples

			a(2)=2 because one diagonal may be placed 2 ways in the quadrilateral (placing none is not allowed).
Generated from Fibonacci polynomials (A011973) and odd self-convolutions of Catalan numbers (A039599):
a(0) = 1*   1 = 1.
a(1) = 1*   1 = 1.
a(2) = 1*   2 + 0*   1/3 = 2.
a(3) = 1*   5 + 1*   3/3 = 6.
a(4) = 1*  14 + 2*   9/3 +  0*  1/5 = 20.
a(5) = 1*  42 + 3*  28/3 +  1*  5/5 = 71.
a(6) = 1* 132 + 4*  90/3 +  3* 20/5 + 0* 1/7 = 264.
a(7) = 1* 429 + 5* 297/3 +  6* 75/5 + 1* 7/7 = 1015.
a(8) = 1*1430 + 6*1001/3 + 10*275/5 + 4*35/7 + 0*1/9 = 4002.
This process is equivalent to the formula:
a(n) = Sum_{k=0..floor((n-1)/2)} C(n-k-1,n-2k-1)*C(2n-2k,n-2k)/(n+1).
The odd self-convolutions of Catalan numbers begin:
A000108^1: {1, 1,  2,  5,  14,  42,  132, 329, 1430, ...}
A000108^3: {1, 3,  9, 28,  90, 297, 1001, ...}
A000108^5: {1, 5, 20, 75, 275, ...}
A000108^7: {1, 7, 35, ...}
		

Crossrefs

Cf. A000108, A003168, A269228. Row sums of A319120.

Programs

  • Maple
    Order := 20; solve(series((A-A^2-A^3)/(1-A^2),A)=x,A);
  • Mathematica
    a[n_] := (2^n*(2n-1)!!* HypergeometricPFQ[{1/2-n/2, 1/2-n/2, 1-n/2, -n/2}, {1/2-n, 1-n, -n}, -4])/(n! + n*n!); Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Jul 25 2011, after Paul D. Hanna *)
  • PARI
    {a(n)=polcoeff(sum(m=0,n,sum(k=0,n, binomial(k+m-1,k)*binomial(2*k+2*m,m)*x^(2*k+m+1)/(2*k+m+1))),n)}
    
  • PARI
    {a(n)=if(n==0,1,sum(k=0,(n-1)\2,binomial(n-k-1,k)*binomial(2*n-2*k,n))/(n+1))} \\ Paul D. Hanna, Dec 15 2004

Formula

G.f. satisfies: A(x) = x + A(x)^2/(1-A(x)^2); by Lagrange Inversion: A(x) = x + Sum_{n>=0} d^n/dx^n (x^2/(1-x^2))^(n+1)/(n+1)!, or: A(x) = Sum_{n>=0} Sum_{k>=n} C(k-1, k-n)*(2*k)!/(2*k-n+1)!*x^(2*k-n+1)/n!. - Paul D. Hanna, Mar 24 2004
a(n) = Sum_{k=0..floor((n-1)/2)} C(n-k-1, k)*C(2*n-2*k, n)/(n+1) for n > 0, with a(0)=1. - Paul D. Hanna, Dec 15 2004
D-finite with recurrence 5*n*(n+1)*(91*n^2 - 367*n + 348)*a(n) = 12*n*(182*n^3 - 825*n^2 + 1053*n - 328)*a(n-1) - 4*(91*n^4 - 549*n^3 + 971*n^2 - 453*n - 108)*a(n-2) + 6*(n-3)*(182*n^3 - 825*n^2 + 1092*n - 384)*a(n-3) - 4*(n-4)*(n-3)*(91*n^2 - 185*n + 72)*a(n-4). - Vaclav Kotesovec, Jul 29 2013
Lim_{n->infinity} a(n)^(1/n) = z, where z = 4.730576939379622... is the root of the equation 4 - 12*z + 4*z^2 - 24*z^3 + 5*z^4 = 0. - Vaclav Kotesovec, Jul 29 2013

Extensions

More terms from Paul D. Hanna, Dec 15 2004

A052553 Square array of binomial coefficients T(n,k) = binomial(n,k), n >= 0, k >= 0, read by upward antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 1, 0, 0, 1, 4, 3, 0, 0, 0, 1, 5, 6, 1, 0, 0, 0, 1, 6, 10, 4, 0, 0, 0, 0, 1, 7, 15, 10, 1, 0, 0, 0, 0, 1, 8, 21, 20, 5, 0, 0, 0, 0, 0, 1, 9, 28, 35, 15, 1, 0, 0, 0, 0, 0, 1, 10, 36, 56, 35, 6, 0, 0, 0, 0, 0, 0, 1, 11, 45, 84, 70, 21, 1, 0, 0, 0, 0, 0, 0, 1, 12, 55
Offset: 0

Views

Author

N. J. A. Sloane, Mar 17 2000

Keywords

Comments

Another version of Pascal's triangle A007318.
As a triangle read by rows, it is (1,0,0,0,0,0,0,0,0,...) DELTA (0,1,-1,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938 and it is the Riordan array (1/(1-x), x^2/(1-x)). The row sums of this triangle are F(n+1) = A000045(n+1). - Philippe Deléham, Dec 11 2011
As a triangle, binomial(n-k, k) is also the number of ways to add k pierced circles to a path graph P_n so that no two circles share a vertex (see Lemma 3.1 at page 5 in Owad and Tsvietkova). - Stefano Spezia, May 18 2022
For all n >= 0, k >= 0, the k-th homology group of the n-torus H_k(T^n) is the free abelian group of rank T(n,k) = binomial(n,k). See the Math Stack Exchange link below. - Jianing Song, Mar 13 2023

Examples

			Array begins:
  1, 0,  0,  0, 0, 0, ...
  1, 1,  0,  0, 0, 0, ...
  1, 2,  1,  0, 0, 0, ...
  1, 3,  3,  1, 0, 0, ...
  1, 4,  6,  4, 1, 0, ...
  1, 5, 10, 10, 5, 1, ...
As a triangle, this begins:
  1;
  1, 0;
  1, 1,  0;
  1, 2,  0, 0;
  1, 3,  1, 0, 0;
  1, 4,  3, 0, 0, 0;
  1, 5,  6, 1, 0, 0, 0;
  1, 6, 10, 4, 0, 0, 0, 0;
  ...
		

Crossrefs

The official entry for Pascal's triangle is A007318. See also A026729 (the same array read by downward antidiagonals).
As a triangle without zeros: A011973.

Programs

  • Magma
    /* As triangle */ [[Binomial(n-k,k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Feb 08 2017
  • Maple
    with(combinat): for s from 0 to 20 do for n from s to 0 by -1 do printf(`%d,`, binomial(n, s-n)) od:od: # James Sellers, Mar 17 2000
  • Mathematica
    Flatten[ Table[ Binomial[n-k , k], {n, 0, 13}, {k, 0, n}]]  (* Jean-François Alcover, Dec 05 2012 *)
  • PARI
    T(n,k) = binomial(n,k) \\ Charles R Greathouse IV, Feb 07 2017
    

Formula

As a triangle: T(n,k) = A026729(n,n-k).
G.f. of the triangular version: 1/(1-x-x^2*y). - R. J. Mathar, Aug 11 2015

A098474 Triangle read by rows, T(n,k) = C(n,k)*C(2*k,k)/(k+1), n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 6, 5, 1, 4, 12, 20, 14, 1, 5, 20, 50, 70, 42, 1, 6, 30, 100, 210, 252, 132, 1, 7, 42, 175, 490, 882, 924, 429, 1, 8, 56, 280, 980, 2352, 3696, 3432, 1430, 1, 9, 72, 420, 1764, 5292, 11088, 15444, 12870, 4862, 1, 10, 90, 600, 2940, 10584, 27720
Offset: 0

Views

Author

Paul Barry, Sep 09 2004

Keywords

Comments

A Catalan scaled binomial matrix.
From Philippe Deléham, Sep 01 2005: (Start)
Table U(n,k), k >= 0, n >= 0, read by antidiagonals, begins:
row k = 0: 1, 1, 2, 5, 14, ... is A000108
row k = 1: 1, 2, 6, 20, 70, ... is A000984
row k = 2: 1, 3, 12, 50, 280, ... is A007854
row k = 3: 1, 4, 20, 104, 548, ... is A076035
row k = 4: 1, 5, 30, 185, 1150, ... is A076036
G.f. for row k: 1/(1-(k+1)*x*C(x)) where C(x) is the g.f. = for Catalan numbers A000108.
U(n,k) = Sum_{j=0..n} A106566(n,j)*(k+1)^j. (End)
This sequence gives the coefficients (increasing powers of x) of the Jensen polynomials for the Catalan sequence A000108 of degree n and shift 0. For the definition of Jensen polynomials for a sequence see a comment in A094436. - Wolfdieter Lang, Jun 25 2019

Examples

			Rows begin:
  1;
  1, 1;
  1, 2,  2;
  1, 3,  6,   5;
  1, 4, 12,  20,  14;
  1, 5, 20,  50,  70,  42;
  1, 6, 30, 100, 210, 252, 132;
  ...
Row 3: t*(1 - 3*t + 6*t^2 - 5*t^3)/(1 - 4*t)^(9/2) = 1/2*Sum_{k >= 1} k*(k+1)*(k+2)*(k+3)/4!*binomial(2*k,k)*t^k. - _Peter Bala_, Jun 13 2016
		

Crossrefs

Row sums are A007317.
Antidiagonal sums are A090344.
Principal diagonal is A000108.
Mirror image of A124644.

Programs

  • Maple
    p := proc(n) option remember; if n = 0 then 1 else normal((x*(1 + 4*x)*diff(p(n-1, x), x) + (2*x + n + 1)*p(n-1, x))/(n + 1)) fi end:
    row := n -> local k; seq(coeff(p(n), x, k), k = 0..n):
    for n from 0 to 6 do row(n) od;  # Peter Luschny, Jun 21 2023
  • Mathematica
    Table[Binomial[n, k] Binomial[2 k, k]/(k + 1), {n, 0, 10}, {k, 0, n}] // Flatten (* or *)
    Table[(-1)^k*CatalanNumber[k] Pochhammer[-n, k]/k!, {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Feb 17 2017 *)
  • Python
    from functools import cache
    @cache
    def A098474row(n: int) -> list[int]:
        if n == 0: return [1]
        a = A098474row(n - 1) + [0]
        row = [0] * (n + 1)
        row[0] = 1; row[1] = n
        for k in range(2, n + 1):
            row[k] = (a[k] * (n + k + 1) + a[k - 1] * (4 * k - 2)) // (n + 1)
        return row  # Peter Luschny, Jun 22 2023
  • Sage
    def A098474(n,k):
        return (-1)^k*catalan_number(k)*rising_factorial(-n,k)/factorial(k)
    for n in range(7): [A098474(n,k) for k in (0..n)] # Peter Luschny, Feb 05 2015
    

Formula

G.f.: 2/(1-x+(1-x-4*x*y)^(1/2)). - Vladeta Jovovic, Sep 11 2004
E.g.f.: exp(x*(1+2*y))*(BesselI(0, 2*x*y)-BesselI(1, 2*x*y)). - Vladeta Jovovic, Sep 11 2004
G.f.: 1/(1-x-xy/(1-xy/(1-x-xy/(1-xy/(1-x-xy/(1-xy/(1-x-xy/(1-xy/(1-... (continued fraction). - Paul Barry, Feb 11 2009
Sum_{k=0..n} T(n,k)*x^(n-k) = A126930(n), A005043(n), A000108(n), A007317(n+1), A064613(n), A104455(n) for x = -2, -1, 0, 1, 2, 3 respectively. - Philippe Deléham, Dec 12 2009
T(n,k) = (-1)^k*Catalan(k)*Pochhammer(-n,k)/k!. - Peter Luschny, Feb 05 2015
O.g.f.: [1 - sqrt(1-4tx/(1-x))]/(2tx) = 1 + (1+t) x + (1+2t+2t^2) x^2 + (1+3t+6t^2+5t^3) x^3 + ... , generating the polynomials of this entry, reverse of A124644. See A011973 for a derivation and the inverse o.g.f., connected to the Fibonacci, Chebyshev, and Motzkin polynomials. See also A267633. - Tom Copeland, Jan 25 2016
From Peter Bala, Jun 13 2016: (Start)
The o.g.f. F(x,t) = ( 1 - sqrt(1 - 4*t*x/(1 - x)) )/(2*t*x) satisfies the partial differential equation d/dx(x*(1 - x)*F) - x*t*(1 + 4*t)*dF/dt - 2*x*t*F = 1. This gives a recurrence for the row polynomials: (n + 2)*R(n+1,t) = t*(1 + 4*t)*R'(n,t) + (2*t + n + 2)*R(n,t), where the prime ' indicates differentiation with respect to t.
Equivalently, setting Q(n,t) = t^(n+2)*R(n,-t)/(1 - 4*t)^(n + 3/2) we have t^2*d/dt(Q(n,t)) = (n + 2)*Q(n+1,t).
This leads to the following expansions:
Q(0,t) = (1/2)*Sum_{k >= 1} k*binomial(2*k,k)*t^(k+1)
Q(1,t) = (1/2)*Sum_{k >= 1} k*(k+1)/2!*binomial(2*k,k)*t^(k+2)
Q(2,t) = (1/2)*Sum_{k >= 1} k*(k+1)*(k+2)/3!*binomial(2*k,k) *t^(k+3) and so on. (End)
Sum_{k=0..n} T(n,k)*x^k = A007317(n+1), A162326(n+1), A337167(n) for x = 1, 2, 3 respectively. - Sergii Voloshyn, Mar 31 2022

Extensions

New name using a formula of Paul Barry by Peter Luschny, Feb 05 2015

A098925 Distribution of the number of ways for a child to climb a staircase having r steps (one step or two steps at a time).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 1, 3, 4, 1, 1, 6, 5, 1, 4, 10, 6, 1, 1, 10, 15, 7, 1, 5, 20, 21, 8, 1, 1, 15, 35, 28, 9, 1, 6, 35, 56, 36, 10, 1, 1, 21, 70, 84, 45, 11, 1, 7, 56, 126, 120, 55, 12, 1, 1, 28, 126, 210, 165, 66, 13, 1, 8, 84, 252, 330, 220, 78, 14, 1, 1, 36, 210, 462, 495, 286, 91
Offset: 0

Views

Author

Alford Arnold, Oct 19 2004

Keywords

Comments

Note that the row sums in the example yield the terms of Fibonacci's sequence(A000045). Were the child capable of taking three steps at a time, the row sums of the resulting table would add to the tribonacci sequence (A000073) etc.
Essentially the same as A030528 (without the 0's), where one can find additional information. - Emeric Deutsch, Mar 29 2005
Triangle T(n,k), with zeros omitted, given by (0, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 08 2012
Aside from signs and index shift, the coefficients of the characteristic polynomial of the Coxeter adjacency matrix for the Coxeter group A_n related to the Chebyshev polynomial of the second kind (cf. Damianou link p. 19). - Tom Copeland, Oct 11 2014

Examples

			There are 13 ways for the child to climb a staircase with six steps since the partitions of 6 into 1's and 2's are 222, 2211, 21111 and 111111; and these can be permuted in 1 + 6 + 5 + 1 = 13 ways.
The general cases can be readily shown by displacing Pascal's Triangle (A007318) as follows:
1
..1
..1..1
.....2..1
.....1..3..1
........3..4..1
........1..6..5..1
Triangle (0, 1, -1, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, ...) begins:
1
0, 1
0, 1, 1
0, 0, 2, 1
0, 0, 1, 3, 1
0, 0, 0, 3, 4, 1
0, 0, 0, 1, 6, 5, 1 - _Philippe Deléham_, Feb 08 2012
		

References

  • Massimo Nocentini, "An algebraic and combinatorial study of some infinite sequences of numbers supported by symbolic and logic computation", PhD Thesis, University of Florence, 2019. See Ex. 14.

Crossrefs

All of A011973, A092865, A098925, A102426, A169803 describe essentially the same triangle in different ways. - N. J. A. Sloane, May 29 2011

Programs

  • Maple
    T:=(n,k)->sum((-1)^(n+i)*binomial(n,i)*binomial(i+k+1,2*k+1),i=0..n): 1,1,seq(seq(T(n,k),k=floor(n/2)..n),n=1..16); # Emeric Deutsch, Mar 29 2005
  • Mathematica
    nn = 15; f[list_] := Select[list, # > 0 &];
    Map[f, CoefficientList[Series[1/(1 - y x - y x^2), {x, 0, nn}], {x, y}]] // Flatten  (* Geoffrey Critzer, Dec 27 2011*)
    Table[ Select[ CoefficientList[ Fibonacci[n, x], x], 0 < # &], {n, 0, 17}] // Flatten (* Robert G. Wilson v, May 03 2017 *)

Formula

T(n,k) = abs(A092865(n,k)).
O.g.f.: 1/(1-y*x-y*x^2). - Geoffrey Critzer, Dec 27 2011.

Extensions

More terms from Emeric Deutsch, Mar 29 2005

A107131 A Motzkin related triangle.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 3, 1, 0, 0, 2, 6, 1, 0, 0, 0, 10, 10, 1, 0, 0, 0, 5, 30, 15, 1, 0, 0, 0, 0, 35, 70, 21, 1, 0, 0, 0, 0, 14, 140, 140, 28, 1, 0, 0, 0, 0, 0, 126, 420, 252, 36, 1, 0, 0, 0, 0, 0, 42, 630, 1050, 420, 45, 1, 0, 0, 0, 0, 0, 0, 462, 2310, 2310, 660, 55, 1
Offset: 0

Views

Author

Paul Barry, May 12 2005

Keywords

Comments

Row sums are Motzkin numbers A001006. Diagonal sums are A025250(n+1).
Inverse binomial transform of Narayana number triangle A001263. - Paul Barry, May 15 2005
T(n,k)=number of Motzkin paths of length n with k steps U=(1,1) or H=(1,0). Example: T(3,2)=3 because we have HUD, UDH and UHD (here D=(1,-1)). T(n,k) = number of bushes with n+1 edges and k+1 leaves (a bush is an ordered tree in which the outdegree of each nonroot node is at least two). - Emeric Deutsch, May 29 2005
Row reverse of A055151. - Peter Bala, May 07 2012
Rows of A088617 are shifted columns of A107131, whose reversed rows are the Motzkin polynomials of A055151, which give the row polynomials (mod signs) of the o.g.f. that is the compositional inverse for an o.g.f. of the Fibonacci polynomials of A011973. The diagonals of A055151 give the rows of A088671, and the antidiagonals (top to bottom) of A088617 give the rows of A107131. The diagonals of A107131 give the columns of A055151. From the relation between A088617 and A107131, the o.g.f. of this entry is (1 - t*x - sqrt((1-t*x)^2 - 4*t*x^2))/(2*t*x^2). - Tom Copeland, Jan 21 2016

Examples

			Triangle begins
  1;
  0,  1;
  0,  1,  1;
  0,  0,  3,  1;
  0,  0,  2,  6,  1;
  0,  0,  0, 10, 10,   1;
  0,  0,  0,  5, 30,  15,   1;
  0,  0,  0,  0, 35,  70,  21,   1;
  0,  0,  0,  0, 14, 140, 140,  28,  1;
  0,  0,  0,  0,  0, 126, 420, 252, 36, 1;
		

Crossrefs

Cf. A001006 (row sums), A025250 (diag. sums), A055151 (row reverse).

Programs

  • Magma
    [Binomial(n, 2*(n-k))*Catalan(n-k): k in [0..n], n in [0..13]]; // G. C. Greubel, May 22 2022
    
  • Maple
    egf := exp(t*x)*hypergeom([],[2],t*x^2);
    s := n -> n!*coeff(series(egf,x,n+2),x,n);
    seq(print(seq(coeff(s(n),t,j),j=0..n)),n=0..9); # Peter Luschny, Oct 29 2014
  • Mathematica
    T[n_, k_] := Binomial[k+1, n-k+1] Binomial[n, k]/(k+1);
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* Jean-François Alcover, Jun 19 2018 *)
  • SageMath
    flatten([[binomial(n, 2*(n-k))*catalan_number(n-k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 22 2022

Formula

Number triangle T(n, k) = binomial(k+1, n-k+1)*binomial(n, k)/(k+1).
T(n, k) = Sum_{j=0..n} (-1)^(n-j)C(n, j)*C(j+1, k)*C(j+1, k+1)/(j+1). - Paul Barry, May 15 2005
G.f.: G = G(t, z) satisfies G = 1 + t*z*G + t*z^2*G^2. - Emeric Deutsch, May 29 2005
Coefficient array for the polynomials x^n*Hypergeometric2F1((1-n)/2, -n/2; 2; 4/x). - Paul Barry, Oct 04 2008
From Paul Barry, Jan 12 2009: (Start)
G.f.: 1/(1-xy(1+x)/(1-x^2*y/(1-xy(1+x)/(1-x^2y/(1-xy(1+x).... (continued fraction).
T(n,k) = C(n, 2n-2k)*A000108(n-k). (End)

A101624 Stern-Jacobsthal numbers.

Original entry on oeis.org

1, 1, 3, 1, 7, 5, 11, 1, 23, 21, 59, 17, 103, 69, 139, 1, 279, 277, 827, 273, 1895, 1349, 2955, 257, 5655, 5141, 14395, 4113, 24679, 16453, 32907, 1, 65815, 65813, 197435, 65809, 460647, 329029, 723851, 65793, 1512983, 1381397, 3881019, 1118225
Offset: 0

Views

Author

Paul Barry, Dec 10 2004

Keywords

Comments

The Stern diatomic sequence A002487 could be called the Stern-Fibonacci sequence, since it is given by A002487(n) = Sum_{k=0..floor(n/2)} (binomial(n-k,k) mod 2), where F(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k,k). Now a(n) = Sum_{k=0..floor(n/2)} (binomial(n-k,k) mod 2)*2^k, where J(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k,k)*2^k, with J(n) = A001045(n), the Jacobsthal numbers. - Paul Barry, Sep 16 2015
These numbers seem to encode Stern (0, 1)-polynomials in their binary expansion. See Dilcher & Ericksen paper, especially Table 1 on page 79, page 5 in PDF. See A125184 (A260443) for another kind of Stern-polynomials, and also A177219 for a reference to maybe a third kind. - Antti Karttunen, Nov 01 2016

Crossrefs

Programs

  • Haskell
    a101624 = sum . zipWith (*) a000079_list . map (flip mod 2) . a011973_row
    -- Reinhard Zumkeller, Jul 14 2015
  • Python
    prpr = 1
    prev = 1
    print("1, 1", end=", ")
    for i in range(99):
        current = (prev)^(prpr*2)
        print(current, end=", ")
        prpr = prev
        prev = current
    # Alex Ratushnyak, Apr 14 2012
    
  • Python
    def A101624(n): return sum(int(not k & ~(n-k))*2**k for k in range(n//2+1)) # Chai Wah Wu, Jun 20 2022
    

Formula

a(n) = Sum_{k=0..floor(n/2)} (binomial(n-k, k) mod 2)*2^k.
a(2^n-1)=1, a(2*n) = 2*a(n-1) + a(n+1) = A099902(n); a(2*n+1) = A101625(n+1).
a(n) = Sum_{k=0..n} (binomial(k, n-k) mod 2)*2^(n-k). - Paul Barry, May 10 2005
a(n) = Sum_{k=0..n} A106344(n,k)*2^(n-k). - Philippe Deléham, Dec 18 2008
a(0)=1, a(1)=1, a(n) = a(n-1) XOR (a(n-2)*2), where XOR is the bitwise exclusive-OR operator. - Alex Ratushnyak, Apr 14 2012
A000120(a(n-1)) = A002487(n). - Karl-Heinz Hofmann, Jun 18 2025

A180177 Triangle read by rows: T(n,k) is the number of compositions of n without 2's and having k parts; 1<=k<=n.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 1, 2, 3, 0, 1, 1, 3, 3, 4, 0, 1, 1, 4, 6, 4, 5, 0, 1, 1, 5, 9, 10, 5, 6, 0, 1, 1, 6, 13, 16, 15, 6, 7, 0, 1, 1, 7, 18, 26, 25, 21, 7, 8, 0, 1, 1, 8, 24, 40, 45, 36, 28, 8, 9, 0, 1, 1, 9, 31, 59, 75, 71, 49, 36, 9, 10, 0, 1, 1, 10, 39, 84, 120, 126, 105, 64, 45, 10, 11, 0, 1
Offset: 1

Views

Author

Emeric Deutsch, Aug 15 2010

Keywords

Comments

T(n,n) = 1; T(n,n-1) = 0; T(n,n-2) = n-2;
T(n,n-3) = n-3; T(n,n-4) = (n-4)(n-3)/2; T(n,n-5) = (n-5)^2.

Examples

			T(7,4)=4 because we have (4,1,1,1), (1,4,1,1), (1,1,4,1), and (1,1,1,4).
Triangle starts:
1;
0,1;
1,0,1;
1,2,0,1;
1,2,3,0,1;
1,3,3,4,0,1;
1,4,6,4,5,0,1;
		

References

  • P. Chinn and S. Heubach, Compositions of n with no occurrence of k, Congressus Numerantium, 164 (2003), pp. 33-51.
  • R.P. Grimaldi, Compositions without the summand 1, Congressus Numerantium, 152, 2001, 33-43.

Crossrefs

Cf. A097230 (same sequence with rows reversed).

Programs

  • Maple
    p:= 2: T := proc (n, k) options operator, arrow: sum((-1)^(k-j)*binomial(k, j)*binomial(n-p*k+p*j-1, j-1), j = (p*k-n)/(p-1) .. k) end proc: for n to 13 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form
    p := 2: g := z/(1-z)-z^p: G := t*g/(1-t*g): Gser := simplify(series(G, z = 0, 15)): for n to 13 do P[n] := sort(coeff(Gser, z, n)) end do: for n to 13 do seq(coeff(P[n], t, k), k = 1 .. n) end do; # yields sequence in triangular form
    with(combinat): m := 2: T := proc (n, k) local ct, i: ct := 0: for i to numbcomp(n, k) do if member(m, composition(n, k)[i]) = false then ct := ct+1 else end if end do: ct end proc: for n to 13 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form
  • Mathematica
    p = 2; max = 14; g = z/(1-z) - z^p; G = t*g/(1-t*g); Gser = Series[G, {z, 0, max+1}]; t[n_, k_] := SeriesCoefficient[Gser, {z, 0, n}, {t, 0, k}]; Table[t[n, k], {n, 1, max}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 28 2014, after Maple *)
  • Maxima
    T(n,k):=if n<0 then 0 else if n=k then 1 else if k=0 then 0 else  T(n-1,k)+T(n-1,k-1)-T(n-2,k-1)+T(n-3,k-1); /* Vladimir Kruchinin, Sep 23 2014 */

Formula

Number of compositions of n without p's and having k parts = Sum((-1)^{k-j} *binomial(k,j) *binomial(n-pk+pj-1,j-1), j=floor((pk-n)/(p-1))..k), (n>=p+1).
For nMilan Janjic, Aug 06 2015
For a given p, the g.f. of the number of compositions without p's is G(t,z)=tg(z)/[1-tg(z)], where g(z)=z/(1-z)-z^p; here z marks sum of parts and t marks number of parts.
G.f.: [(x-x^2+x^3)/(1-x)]^k=sum{n>0, T(n,k)*x^n}, T(n,k)=T(n-1,k)+T(n-1,k-1)-T(n-2,k-1)+T(n-3,k-1). - Vladimir Kruchinin, Sep 29 2014

A335964 Triangle read by rows, T(n,k) = T(n-1,k) + T(n-3,k-1) + T(n-4,k-2) + delta(n,0)*delta(k,0), T(n,k<0) = T(n

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 3, 2, 0, 0, 0, 1, 4, 4, 0, 0, 0, 0, 1, 5, 7, 2, 0, 0, 0, 0, 1, 6, 11, 6, 1, 0, 0, 0, 0, 1, 7, 16, 13, 3, 0, 0, 0, 0, 0, 1, 8, 22, 24, 9, 0, 0, 0, 0, 0, 0, 1, 9, 29, 40, 22, 3, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Michael A. Allen, Jul 01 2020

Keywords

Comments

T(n,k) is the number of tilings of an n-board (a board with dimensions n X 1) using k (1,1)-fence tiles and n-2k square tiles. A (w,g)-fence tile is composed of two tiles of width w separated by a gap of width g.
Sum of n-th row = A006498(n).
T(2*j+r,k) is the coefficient of x^k in (f(j,x))^(2-r)*(f(j+1,x))^r for r=0,1 where f(n,x) is one form of a Fibonacci polynomial defined by f(n+1,x) = f(n,x) + x*f(n-1,x) where f(0,x)=1 and f(n<0,x)=0. - Michael A. Allen, Oct 02 2021

Examples

			Triangle begins:
  1;
  1,  0;
  1,  0,  0;
  1,  1,  0,  0;
  1,  2,  1,  0,  0;
  1,  3,  2,  0,  0,  0;
  1,  4,  4,  0,  0,  0,  0;
  1,  5,  7,  2,  0,  0,  0,  0;
  1,  6, 11,  6,  1,  0,  0,  0,  0;
  1,  7, 16, 13,  3,  0,  0,  0,  0,  0;
  1,  8, 22, 24,  9,  0,  0,  0,  0,  0,  0;
  1,  9, 29, 40, 22,  3,  0,  0,  0,  0,  0,  0;
  ...
		

Crossrefs

Other triangles related to tiling using fences: A059259, A123521, A157897, A158909.
Cf. A006498 (row sums), A011973, A348445.

Programs

  • Mathematica
    T[n_,k_]:=If[n
    				
  • PARI
    TT(n,k) = if (nA059259
    T(n,k) = TT(n-k,k);
    \\ matrix(7,7,n,k, T(n-1,k-1)) \\ Michel Marcus, Jul 18 2020

Formula

T(n,k) = A059259(n-k,k).
From Michael A. Allen, Oct 02 2021: (Start)
G.f.: 1/((1 + x^2*y)(1 - x - x^2*y)) in the sense that T(n,k) is the coefficient of x^n*y^k in the expansion of the g.f.
T(n,0) = 1.
T(n,1) = n-2 for n>1.
T(n,2) = binomial(n-4,2) + n - 3 for n>3.
T(n,3) = binomial(n-6,3) + 2*binomial(n-5,2) for n>5.
T(4*m-3,2*m-2) = T(4*m-1,2*m-1) = m for m>0.
T(2*n+1,n-k) = A158909(n,k). (End)
T(n,k) = A348445(n-2,k) for n>1.

A092684 First column and main diagonal of triangle A092683, in which the convolution of each row with {1,1} produces a triangle that, when flattened, equals the flattened form of A092683.

Original entry on oeis.org

1, 1, 2, 3, 6, 11, 21, 39, 74, 141, 272, 527, 1026, 2002, 3914, 7659, 14996, 29369, 57531, 112727, 220963, 433342, 850386, 1670011, 3282259, 6456475, 12711413, 25047465, 49396116, 97490480, 192552549, 380565123, 752619506, 1489234257
Offset: 0

Views

Author

Paul D. Hanna, Mar 04 2004

Keywords

Comments

The self-convolution forms A100938. - Paul D. Hanna, Nov 23 2004
The limit of the matrix power A011973^n, as n->inf, results in a single column vector equal to this sequence. - Paul D. Hanna, May 03 2006

Examples

			a(8) = Sum_{k=0..[8/2]} C(n-k,k)*a(k)
= C(8,0)*a(0) +C(7,1)*a(1) +C(6,2)*a(2) +C(5,3)*a(3) +C(4,4)*a(4)
= 1*1 + 7*1 + 15*2 + 10*3 + 1*6 = 74.
		

Crossrefs

Cf. A011973 (Fibonacci polynomials), A100938 (self-convolution).

Programs

  • PARI
    {T(n,k)=if(n<0 || k>n,0, if(n==0 && k==0,1, if(n==1 && k<=1,1, if(k==n,T(n,0), T(n-1,k)+T(n-1,k+1)))))}
    a(n)=T(n,0)
    
  • PARI
    a(n)=if(n==0,1,sum(k=0,n\2,binomial(n-k,k)*a(k))) \\ Paul D. Hanna, May 03 2006
    
  • PARI
    {a(n)=local(A=1+x);for(i=0,n\2,A=subst(A,x,x^2/(1-x+x*O(x^n)))/(1-x));polcoeff(A,n)} \\ Paul D. Hanna, Jul 10 2006

Formula

Invariant under the transformation of Fibonacci triangle A011973(n,k)=C(n-k,k): a(n) = Sum_{k=0..[n/2]} C(n-k,k)*a(k). - Paul D. Hanna, May 03 2006
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k)*a(k). - Vladeta Jovovic, May 07 2006
G.f. satisfies: A(x) = A( x^2/(1-x) )/(1-x). - Paul D. Hanna, Jul 10 2006

A101785 G.f. satisfies: A(x) = 1 + x*A(x)/(1 - x^2*A(x)^2).

Original entry on oeis.org

1, 1, 1, 2, 5, 12, 30, 79, 213, 584, 1628, 4600, 13138, 37871, 110043, 321978, 947813, 2805104, 8341608, 24912004, 74686460, 224694128, 678143656, 2052640752, 6229616730, 18952875247, 57792705415, 176596786934, 540679385663
Offset: 0

Views

Author

Paul D. Hanna, Dec 16 2004

Keywords

Comments

Formula may be derived using the Lagrange Inversion theorem (cf. A049124).
a(n) = number of Dyck n-paths (A000108) all of whose descents have odd length. For example, a(3) counts UUUDDD, UDUDUD. - David Callan, Jul 25 2005
The number of noncrossing partitions of [n] with all blocks of odd size. E.g.: a(4)=5 with the five partitions being 123/4, 124/3, 134/2,1/234 and 1/2/3/4. - Louis Shapiro, Jan 07 2006
Number of ordered trees with n edges in which every non-leaf vertex has an odd number of children. - David Callan, Mar 30 2007
Number of valid hook configurations of permutations of [n] that avoid the patterns 312 and 321. - Colin Defant, Apr 28 2019

Examples

			Generated from Fibonacci polynomials (A011973) and
coefficients of odd powers of 1/(1-x):
a(1) = 1*1/1
a(2) = 1*1/1 + 0*1/3
a(3) = 1*1/1 + 1*3/3
a(4) = 1*1/1 + 2*6/3 + 0*1/5
a(5) = 1*1/1 + 3*10/3 + 1*5/5
a(6) = 1*1/1 + 4*15/3 + 3*15/5 + 0*1/7
a(7) = 1*1/1 + 5*21/3 + 6*35/5 + 1*7/7
a(8) = 1*1/1 + 6*28/3 + 10*70/5 + 4*28/7 + 0*1/9
This process is equivalent to the formula:
a(n) = Sum_{k=0..[(n-1)/2]} C(n-k-1,k)*C(n,2*k)/(2*k+1).
		

Crossrefs

Column k=2 of A212382.

Programs

  • Magma
    [n eq 0 select 1 else (&+[Binomial(n-k-1,k)*Binomial(n, 2*k)/(2*k+1): k in [0..Floor((n-1)/2)]]): n in [0..30]]; // G. C. Greubel, May 03 2019
    
  • Mathematica
    Flatten[{1,Table[Sum[Binomial[n-k-1,k]*Binomial[n,2*k]/(2*k+1),{k,0,Floor[(n-1)/2]}],{n,1,20}]}] (* Vaclav Kotesovec, Sep 17 2013 *)
    CoefficientList[InverseSeries[Series[x*(1-x^2)/(1+x-x^2), {x, 0, 30}], x]/x, x] (* G. C. Greubel, May 03 2019 *)
  • PARI
    {a(n)=if(n==0,1,sum(k=0,(n-1)\2,binomial(n-k-1,k)*binomial(n,2*k)/(2*k+1)))}
    for(n=1, 40, print1(a(n), ", "))
    
  • PARI
    N=66; Vec(serreverse(x/(1+sum(k=1,N,x^(2*k-1)))+O(x^N))/x) /* Joerg Arndt, Aug 19 2012 */
    
  • Sage
    [1]+[sum(binomial(n-k-1, k)*binomial(n, 2*k)/(2*k+1) for k in (0..floor((n-1)/2))) for n in (1..30)] # G. C. Greubel, May 03 2019

Formula

a(n) = Sum_{k=0..[(n-1)/2]} C(n-k-1, k)*C(n, 2*k)/(2*k+1) for n>0, with a(0)=1.
G.f.: (1/x) * Series_Reversion( x*(1-x^2)/(1+x-x^2) ).
Recurrence: 4*n*(n+1)*(91*n^2 - 379*n + 360)*a(n) = 6*n*(182*n^3 - 849*n^2 + 1075*n - 264)*a(n-1) - 2*(182*n^4 - 1122*n^3 + 2011*n^2 - 603*n - 648)*a(n-2) + 6*(n-3)*(364*n^3 - 1698*n^2 + 2267*n - 696)*a(n-3) - 5*(n-4)*(n-3)*(91*n^2 - 197*n + 72)*a(n-4). - Vaclav Kotesovec, Sep 17 2013
a(n) ~ c*d^n/(sqrt(Pi)*n^(3/2)), where d = 3/4 + 1/(4*sqrt(3/(19 - 304/(4103 + 273*sqrt(273))^(1/3) + 2*(4103 + 273*sqrt(273))^(1/3)))) + 1/2*sqrt(19/6 + 76/(3*(4103 + 273*sqrt(273))^(1/3)) - 1/6*(4103 + 273*sqrt(273))^(1/3) + 63/2*sqrt(3/(19 - 304/(4103 + 273*sqrt(273))^(1/3) + 2*(4103 + 273*sqrt(273))^(1/3)))) = 3.228704951094501729... is the root of the equation 5 - 24*d + 4*d^2 - 12*d^3 + 4*d^4 = 0 and c = 0.82499074317860885542266460957609663272... is the root of the equation -125 - 3376*c^2 - 22080*c^4 - 23296*c^6 + 93184*c^8 = 0. - Vaclav Kotesovec, added Sep 17 2013, updated Jan 04 2014
G.f.: 1/(9*(3-3*x+x^2))*(x^2+27- x^2*(2*x+3)^3*(x-6)^3/(9*(3-3*x+x^2)^3*S(0) - x^2*(2*x+3)^2*(x-6)^2 )), where S(k) = 4*k+3 - x^2*(2*x^2-9*x-18)^2*(3*k+4)*(6*k+5)/( 18*(4*k+5)*(3-3*x+x^2)^3 - x^2*(2*x^2-9*x-18)^2*(3*k+5)*(6*k+7)/S(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Dec 26 2013
Previous Showing 31-40 of 87 results. Next