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

A196417 Erroneous version of A080937.

Original entry on oeis.org

1, 2, 5, 14, 42, 131, 417, 1341, 4334, 14042, 45562, 148029, 481804, 1572625, 5156025, 17018505, 56717910, 191540940, 658084182, 2309516616
Offset: 1

Views

Author

Keywords

A006054 a(n) = 2*a(n-1) + a(n-2) - a(n-3), with a(0) = a(1) = 0, a(2) = 1.

Original entry on oeis.org

0, 0, 1, 2, 5, 11, 25, 56, 126, 283, 636, 1429, 3211, 7215, 16212, 36428, 81853, 183922, 413269, 928607, 2086561, 4688460, 10534874, 23671647, 53189708, 119516189, 268550439, 603427359, 1355888968, 3046654856, 6845771321, 15382308530, 34563733525
Offset: 0

Views

Author

Keywords

Comments

Let u(k), v(k), w(k) be defined by u(1)=1, v(1)=0, w(1)=0 and u(k+1)=u(k)+v(k)+w(k), v(k+1)=u(k)+v(k), w(k+1)=u(k); then {u(n)} = 1,1,3,6,14,31,... (A006356 with an extra initial 1), {v(n)} = 0,1,2,5,11,25,... (this sequence with its initial 0 deleted) and {w(n)} = {u(n)} prefixed by an extra 0 = A077998 with an extra initial 0. - Benoit Cloitre, Apr 05 2002. Also u(k)^2+v(k)^2+w(k)^2 = u(2k). - Gary W. Adamson, Dec 23 2003
Form the graph with matrix A=[1, 1, 1; 1, 0, 0; 1, 0, 1]. Then A006054 counts walks of length n between the vertex of degree 1 and the vertex of degree 3. - Paul Barry, Oct 02 2004
Form the digraph with matrix [1,1,0; 1,0,1; 1,1,1]. A006054(n) counts walks of length n between the vertices with loops. - Paul Barry, Oct 15 2004
Nonzero terms = INVERT transform of (1, 1, 2, 2, 3, 3, ...). Example: 56 = (1, 1, 2, 5, 11, 25) dot (3, 3, 2, 2, 1, 1) = (3 + 3 + 4 + 10 + 11 + 25). - Gary W. Adamson, Apr 20 2009
-a(n+1) appears in the formula for the nonpositive powers of rho:= 2*cos(Pi/7), the ratio of the smaller diagonal in the heptagon to the side length s=2*sin(Pi/7), when expressed in the basis <1,rho,sigma>, with sigma:=rho^2-1, the ratio of the larger heptagon diagonal to the side length, as follows. rho^(-n) = C(n)*1 + C(n-1)*rho - a(n+1)*sigma, n >= 0, with C(n)=A077998(n), C(-1):=0. See the Steinbach reference, and a comment under A052547.
If, with the above notations, the power basis of the field Q(rho) is taken one has for nonpositive powers of rho, rho^(-n) = a(n+2)*1 + A077998(n-1)*rho - a(n+1)*rho^2. For nonnegative powers see A006053. See also the Steinbach reference. - Wolfdieter Lang, May 06 2011
a(n) appears also in the nonnegative powers of sigma,(defined in the above comment, where also the basis is given). See a comment in A106803.
The sequence b(n):=(-1)^(n+1)*a(n) forms the negative part (i.e., with nonpositive indices) of the sequence (-1)^n*A006053(n+1). In this way we obtain what we shall call the Ramanujan-type sequence number 2a for the argument 2*Pi/7 (see the comment to Witula's formula in A006053). We have b(n) = -2*b(n-1) + b(n-2) + b(n-3) and b(n) * 49^(1/3) = (c(1)/c(4))^(1/3) * (c(1))^(-n) + (c(2)/c(1))^(1/3) * (c(2))^(-n) + (c(4)/c(2))^(1/3) * (c(4))^(-n) = (c(2)/c(1))^(1/3) * (c(1))^(-n+1) + (c(4)/c(2))^(1/3) * (c(2))^(-n+1) + (c(1)/c(4))^(1/3) * (c(4))^(-n+1), where c(j) := 2*cos(2*Pi*j/7) (for the proof, see the comments to A215112). - Roman Witula, Aug 06 2012
(1, 1, 2, 5, 11, 25, 56, ...) * (1, 0, 1, 0, 1, ...) = the variant of A006356: (1, 1, 3, 6, 14, 31, ...). - Gary W. Adamson, May 15 2013
The limit of a(n+1)/a(n) for n -> infinity is, for all generic sequences with this recurrence of signature (2,1,-1), sigma = rho^2-1, approximately 2.246979603, the length ratio (largest diagonal)/side in the regular heptagon (7-gon). For rho = 2*cos(Pi/7) and sigma see a comment above, and the P. Steinbach reference. Proof: a(n+1)/a(n) = 2 + 1/(a(n)/a(n-1)) - 1/((a(n)/a(n-1))*(a(n-1)/a(n-2))), leading in the limit to sigma^3 -2*sigma^2 - sigma + 1, which is solved by sigma = rho^2-1, due to C(7, rho) = 0 , with the minimal polynomial C(7, x) = x^3 - x^2 - 2*x + 1 of rho (see A187360). - Wolfdieter Lang, Nov 07 2013
Numbers of straight-chain aliphatic amino acids involving single, double or triple bonds (allowing adjacent double bonds) when cis/trans isomerism is neglected. - Stefan Schuster, Apr 19 2018
Let A(r,n) be the total number of ordered arrangements of an n+r tiling of r red squares and white tiles of total length n, where the individual tile lengths can range from 1 to n. A(r,0) corresponds to a tiling of r red squares only, and so A(r,0) = 1. Also, A(r,n)=0 for n<0. Let A_1(r,n) = Sum_{j=0..n} A(r,j). Then the expansion of 1/(1 - 2*x - x^2 + x^3) is A_1(0,n) + A_1(1,n-2) + A_1(n-4) + ... = a(n) without the initial two 0's. In general, the expansion of 1/(1 - 2*x -x^k + x^(k+1)) is equal to Sum_{j>=0} A_1(j, n-j*k). - Gregory L. Simay, May 25 2018
For n>1, a(n) is the number of ways to tile a strip of length n-1 with one color of squares and dominos, two colors of trominos and quadrominos, 3 colors of 5-minos and 6-minos, and so on. - Greg Dresden and Zhiyu Zhang, Jun 26 2025

Examples

			G.f. = x^2 + 2*x^3 + 5*x^4 + 11*x^5 + 25*x^6 + 56*x^7 + 126*x^8 + 283*x^9 + ... - _Michael Somos_, Jun 25 2018
		

References

  • Jay Kappraff, Beyond Measure, A Guided Tour Through Nature, Myth and Number, World Scientific, 2002.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006054 n = a006053_list !! n
    a006054_list = 0 : 0 : 1 : zipWith (+) (map (2 *) $ drop 2 a006054_list)
       (zipWith (-) (tail a006054_list) a006054_list)
    -- Reinhard Zumkeller, Oct 14 2011
  • Maple
    A006054:=z**2/(1-2*z-z**2+z**3); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    LinearRecurrence[{2, 1, -1}, {0, 0, 1}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 10 2012 *)
  • Maxima
    a(n):=if n<2 then 0 else if n=2 then 1 else b(n-2);
    b(n):=sum(sum(binomial(j,n-3*k+2*j)*(-1)^(j-k)*binomial(k,j)*2^(-n+3*k-j),j,0,k),k,1,n); /* Vladimir Kruchinin, May 05 2011 */
    
  • PARI
    x='x+O('x^66);
    concat([0, 0], Vec(x^2/(1-2*x-x^2+x^3))) \\ Joerg Arndt, May 05 2011
    

Formula

G.f.: x^2/(1-2*x-x^2+x^3).
Sum_{k=0..n+2} a(k) = A077850(n). - Philippe Deléham, Sep 07 2006
Let M = the 3 X 3 matrix [1,1,0; 1,2,1; 0,1,2], then M^n*[1,0,0] = [A080937(n-1), A094790(n), A006054(n-1)]. E.g., M^3*[1,0,0] = [5,9,5] = [A080937(2), A094790(3), A006054(2)]. - Gary W. Adamson, Feb 15 2006
a(n) = round(k*A006356(n-1)), for n>1, where k = 0.3568958678... = 1/(1+2*cos(Pi/7)). - Gary W. Adamson, Jun 06 2008
a(n+1) = A187070(2n+1) = A187068(2n+3). - L. Edson Jeffery, Mar 10 2011
a(n+3) = Sum_{k=1..n} Sum_{j=0..k} binomial(j,n-3*k+2*j)*(-1)^(j-k)*binomial(k,j)*2^(-n+3*k-j); a(0)=0, a(1)=0, a(2)=1. - Vladimir Kruchinin, May 05 2011
7*a(n) = (c(2)-c(4))*(1+c(1))^n + (c(4)-c(1))*(1+c(2))^n + (c(1)-c(2))*(1+c(4))^n, where c(j):=2*cos(2*Pi*j/7) - for the proof see Witula et al. papers. - Roman Witula, Aug 07 2012
a(n) = -A006053(1-n) for all n in Z. - Michael Somos, Jun 25 2018

A005021 Random walks (binomial transform of A006054).

Original entry on oeis.org

1, 5, 19, 66, 221, 728, 2380, 7753, 25213, 81927, 266110, 864201, 2806272, 9112264, 29587889, 96072133, 311945595, 1012883066, 3288813893, 10678716664, 34673583028, 112584429049, 365559363741, 1186963827439, 3854047383798, 12514013318097, 40632746115136
Offset: 0

Views

Author

Keywords

Comments

Number of walks of length 2n+5 in the path graph P_6 from one end to the other one. Example: a(1)=5 because in the path ABCDEF we have ABABCDEF, ABCBCDEF, ABCDCDEF, ABCDEDEF and ABCDEFEF. - Emeric Deutsch, Apr 02 2004
Since a(n) is the binomial transform of A006054 from formula (3.63) in the Witula-Slota-Warzynski paper, it follows that a(n)=A(n;1)*(B(n;-1)-C(n;-1))-B(n;1)*B(n;-1)+C(n;1)*(A(n;-1)-B(n;-1)+C(n;-1)), where A(n;1)=A077998(n), B(n;1)=A006054(n+1), C(n;1)=A006054(n), A(n;-1)=A121449(n), B(n+1;-1)=-A085810(n+1), C(n;-1)=A215404(n) and A(n;d), B(n;d), C(n;d), n in N, d in C, denote the quasi-Fibonacci numbers defined and discussed in comments in A121449 and in the cited paper. - Roman Witula, Aug 09 2012
From Wolfdieter Lang, Mar 30 2020: (Start)
With offset -4 this sequence 6, 1, 0, 0, 1, 5, ... appears in the formula for the n-th power of the 3 X 3 tridiagonal Matrix M_3 = Matrix([1,1,0], [1,2,1], [0,1,2]) from A332602: (M_3)^n = a(n-2)*(M_3)^2 - (6*a(n-3) - a(n-4))*M_3 + a(n-3)*1_3, with the 3 X 3 unit matrix 1_3, for n >= 0. Proof from Cayley-Hamilton: (M_3)^n = 5*(M_3)^3 - 6*M_3 + 1_3 (see A332602 for the characteristic polynomial Phi(3, x)), and the recurrence (M_3)^n = M_3*(M_3)^(n-1). For (M_3)^n[1,1] = 2*a(n-2) - 5*a(n-3) + a(n-4), for n >= 0, see A080937(n).
The formula for a(n) in terms of r = rho(7) = A160389 given below shows that a(n)/a(n-1) converges to rho(7)^2 = A116425 = 3.2469796... for n -> infinity. This is because r - 2/r = 0.692..., and r - 1 - 1/r = 0.137... .
(End)

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 3rd ed, Wiley, New York, 1968, p. 96.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Double partial sums of A060557. Bisection of A052547.

Programs

  • Magma
    I:=[1,5,19]; [n le 3 select I[n] else 5*Self(n-1)-6*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Sep 18 2015
    
  • Maple
    a:=k->sum(binomial(5+2*k,7*j+k-2),j=ceil((2-k)/7)..floor((7+k)/7))-sum(binomial(5+2*k,7*j+k-1),j=ceil((1-k)/7)..floor((6+k)/7)): seq(a(k),k=0..25);
    A005021:=-(z-1)*(z-5)/(-1+5*z-6*z**2+z**3); # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence apart from the initial 1
  • Mathematica
    LinearRecurrence[{5,-6,1}, {1,5,19}, 50] (* Roman Witula, Aug 09 2012 *)
    CoefficientList[Series[1/(1 - 5 x + 6 x^2 - x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 18 2015 *)
  • PARI
    x='x+O('x^30); Vec(1/(1-5*x+6*x^2-x^3)) \\ G. C. Greubel, Apr 19 2018

Formula

G.f.: 1/(1-5x+6x^2-x^3). - Emeric Deutsch, Apr 02 2004
a(n) = 5*a(n-1) -6*a(n-2) +a(n-3). - Emeric Deutsch, Apr 02 2004
a(n) = Sum_{j=-infinity..infinity} (binomial(5+2*k, 7*j+k-2) - binomial(5+2*k, 7*j+k-1)) (a finite sum).
a(n-2) = 2^n*C(n;1/2)=(1/7)*((c(2)-c(4))*(c(4))^(2n) + (c(4)-c(1))*(c(1))^(2n) + (c(1)-c(2))*(c(2))^(2n)), where a(-2)=a(-1):=0, c(j):=2*cos(2Pi*j/7). This formula follows from the Binet formula for C(n;d)--one of the quasi-Fibonacci numbers (see comments in A121449 and the formula (3.17) in the Witula-Slota-Warzynski paper). - Roman Witula, Aug 09 2012
In terms of the algebraic number r = rho(7) = 2*cos(Pi/7) = A160389 of degree 3 the preceding formula gives a(n) = r^(2*(n+2))*(A1(r) + A2(r)*(r - 2/r)^(2*(n+1)) = A3(r)*(r - 1 - 1/r)^(2*(n+1)))/7, for n >= -4 (see a comment above for this offset), with A1(r) = -r^2 + 2*r + 1, A2(r) = -r^2 - r + 2, and A3(r) = 2*r^2 - r - 3. - Wolfdieter Lang, Mar 30 2020

Extensions

a(25)-a(26) from Vincenzo Librandi, Sep 18 2015

A211216 Expansion of (1-8*x+21*x^2-20*x^3+5*x^4)/(1-9*x+28*x^2-35*x^3+15*x^4-x^5).

Original entry on oeis.org

1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16795, 58766, 207783, 740924, 2660139, 9603089, 34818270, 126676726, 462125928, 1689438278, 6186432967, 22682699779, 83249302471, 305773834030, 1123771473120, 4131947428007, 15197952958467, 55915691993228
Offset: 0

Views

Author

Bruno Berselli, May 11 2012

Keywords

Comments

In the paper of Kitaev, Remmel and Tiefenbruck (see the Links section), Q_(132)^(k,0,0,0)(x,0) represents a generating function depending on k and x.
For successive values of k we have:
k=1, the g.f. of A000012: 1/(1-x);
k=2, " A011782: (1-x)/(1-2*x);
k=3, " A001519: (1-2*x)/(1-3*x+x^2);
k=4, " A124302: (1-3*x+x^2)/(1-4*x+3*x^2);
k=5, " A080937: (1-4*x+3*x^2)/(1-5*x+6*x^2-x^3);
k=6, " A024175: (1-5*x+6*x^2-x^3)/(1-6*x+10*x^2-4*x^3);
k=7, " A080938: (1-6*x+10*x^2-4*x^3)/(1-7*x+15*x^2-10*x^3+x^4);
k=8, " A033191: (1-7*x+15*x^2-10*x^3+x^4)/(1-8*x+21*x^2
-20*x^3+5*x^4).
This sequence corresponds to the case k=9.
We observe that the coefficients of numerators and denominators are in A115139.
In general, Q_(132)^(k,0,0,0)(x,0) is the generating function for Dyck paths whose maximum height is less than or equal to k; also, it is the generating function of rooted binary trees T which have no nodes 'eta' such that there are >= k left edges on the path from 'eta' to the root of T (see cited paper, page 11).

Crossrefs

Programs

  • Magma
    m:=28; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-8*x+21*x^2-20*x^3+5*x^4)/(1-9*x+28*x^2-35*x^3+15*x^4-x^5)));
  • Mathematica
    CoefficientList[Series[(1 - 8 x + 21 x^2 - 20 x^3 + 5 x^4)/(1 - 9 x + 28 x^2 - 35 x^3 + 15 x^4 - x^5), {x, 0, 27}], x]
  • PARI
    Vec((1-8*x+21*x^2-20*x^3+5*x^4)/(1-9*x+28*x^2-35*x^3+15*x^4-x^5)+O(x^28))
    

Formula

G.f.: (1-3*x+x^2)*(1-5*x+5*x^2)/(1-9*x+28*x^2-35*x^3+15*x^4-x^5).
G.f.: 1/(1-x/(1-x/(1-x/(1-x/(1-x/(1-x/(1-x/(1-x/(1-x))))))))). - Philippe Deléham, Mar 14 2013
a(n) = A000108(n) + Sum_{k=1..n} (4*binomial(2*n, n+11*k) - binomial(2*n+2, n+11*k+1)). - Greg Dresden, Jan 28 2023

A094789 Number of (s(0), s(1), ..., s(2n+1)) such that 0 < s(i) < 7 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+1, s(0) = 1, s(2n+1) = 4.

Original entry on oeis.org

1, 4, 14, 47, 155, 507, 1652, 5373, 17460, 56714, 184183, 598091, 1942071, 6305992, 20475625, 66484244, 215873462, 700937471, 2275930827, 7389902771, 23994866364, 77910846021, 252974934692, 821404463698, 2667083556359
Offset: 1

Views

Author

Herbert Kociemba, Jun 11 2004

Keywords

Comments

In general, a(n) = (2/m)*Sum_{r=1..m-1} sin(r*j*Pi/m)*sin(r*k*Pi/m)*(2*cos(r*Pi/m))^(2n+1) counts (s(0), s(1), ..., s(2n+1)) such that 0 < s(i) < m and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+1, s(0) = j, s(2n+1) = k.
With interpolated zeros (0,0,0,1,0,4,0,14,...) counts walks of length n between the start and fourth nodes on P_6. - Paul Barry, Jan 26 2005
The Hankel transforms of this sequence or of this sequence with the first term omitted give 1, -2, 1, 1, -2, 1, ... . - Wathek Chammam, Nov 16 2011
Diagonal of the square array A216201. - Philippe Deléham, Mar 28 2013

Crossrefs

Programs

  • Magma
    I:=[1,4,14]; [n le 3 select I[n] else 5*Self(n-1)-6*Self(n-2)+Self(n-3): n in [1..45]]; // Vincenzo Librandi, Nov 10 2014
    
  • Mathematica
    f[n_] := FullSimplify[ TrigToExp[(2/7)Sum[ Sin[Pi*k/7]Sin[4Pi*k/7](2Cos[Pi*k/7])^(2n + 1), {k, 1, 6}]]]; Table[ f[n], {n, 25}] (* Robert G. Wilson v, Jun 18 2004 *)
    LinearRecurrence[{5,-6,1}, {1,4,14}, 50] (* Roman Witula, Aug 09 2012 *)
    CoefficientList[Series[(x - 1) / (- 1 + 5 x - 6 x^2 + x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Nov 10 2014 *)
  • PARI
    Vec(x*(x-1)/(-1 + 5*x - 6*x^2 + x^3) + O(x^40)) \\ Michel Marcus, Nov 10 2014

Formula

a(n) = (2/7)*Sum_{k = 1..6} sin(Pi*k/7)*sin(4*Pi*k/7)*(2*cos(Pi*k/7))^(2n + 1).
a(n) = 5*a(n-1) - 6*a(n-2) + a(n-3).
G.f.: x*(x-1)/(-1 + 5*x - 6*x^2 + x^3). - Corrected by Vincenzo Librandi, Nov 10 2014
a(n) = 2^n*B(n; 1/2) = (1/7)*((c(1) - c(4))*(c(4))^(2n) + (c(2) - c(1))*(c(1))^(2n) + (c(4) - c(2))*(c(2))^(2n)), where c(j) := 2*cos(2*Pi*j/7). Here B(n; d), n in N, d in C denotes the respective quasi-Fibonacci number - see A121449 and Witula-Slota-Warzynski paper for details (see also A052975, A085810, A077998, A006054, A121442). - Roman Witula, Aug 09 2012
a(n+1) = A216201(n,n+2) = A216201(n,n+3). - Philippe Deléham, Mar 28 2013

A094790 Number of (s(0), s(1), ..., s(2n)) such that 0 < s(i) < 7 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2*n, s(0) = 1, s(2n) = 3.

Original entry on oeis.org

1, 3, 9, 28, 89, 286, 924, 2993, 9707, 31501, 102256, 331981, 1077870, 3499720, 11363361, 36896355, 119801329, 388991876, 1263047761, 4101088878, 13316149700, 43237262993, 140390505643, 455845099957, 1480119728920
Offset: 1

Views

Author

Herbert Kociemba, Jun 11 2004

Keywords

Comments

In general a(n) = (2/m)*Sum_{r=1..m-1} sin(r*j*Pi/m)*sin(r*k*Pi/m)*(2*cos(r*Pi/m))^(2n)) counts (s(0), s(1), ..., s(2n)) such that 0 < s(i) < m and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n, s(0) = j, s(2n) = k.
With interpolated zeros (0,0,1,0,3,0,9,...), counts walks of length n between the first and third nodes of P_6. - Paul Barry, Jan 26 2005
Counts all paths of length (2*n+1), n >= 0, starting at the initial node and ending on the nodes 1, 2, 3, 4 and 5 on the path graph P_6, see the Maple program. - Johannes W. Meijer, May 29 2010
With offset 0 = the INVERT transform of A055588. - Gary W. Adamson, Apr 01 2011

Crossrefs

Programs

  • Magma
    [n le 3 select 3^(n-1) else 5*Self(n-1) -6*Self(n-2) +Self(n-3): n in [1..31]]; // G. C. Greubel, Feb 12 2023
    
  • Maple
    with(GraphTheory):G:=PathGraph(6): A:= AdjacencyMatrix(G): nmax:=24; n2:=2*nmax+1: for n from 0 to n2 do B(n):=A^n; a(n):=add(B(n)[k,1],k=1..5); od: seq(a(2*n+1),n=0..nmax); # Johannes W. Meijer, May 29 2010
  • Mathematica
    f[n_]:= FullSimplify[ TrigToExp[(2/7)Sum[ Sin[Pi*k/7]Sin[3Pi*k/7](2Cos[Pi*k/7] )^(2n), {k,6}]]];
    Table[f[n], {n, 25}] (* Robert G. Wilson v, Jun 18 2004 *)
    LinearRecurrence[{5,-6,1},{1,3,9},30] (* Harvey P. Dale, Nov 19 2019 *)
  • PARI
    Vec(x*(1-2*x)/(1-5*x+6*x^2-x^3)+O(x^99)) \\ Charles R Greathouse IV, Jun 14 2015
    
  • SageMath
    @CachedFunction
    def a(n): # a = A094790
        if (n<4): return 3^(n-1)
        else: return 5*a(n-1) - 6*a(n-2) + a(n-3)
    [a(n) for n in range(1,41)] # G. C. Greubel, Feb 12 2023

Formula

a(n) = (2/7)*Sum_{k=1..6} sin(Pi*k/7)*sin(3*Pi*k/7)*(2*cos(Pi*k/7))^(2n).
a(n) = 5*a(n-1) - 6*a(n-2) + a(n-3).
G.f.: x*(1-2*x)/(1 - 5*x + 6*x^2 - x^3).
a(n) = rightmost term in M^n * [1,0,0] where M = the 3 X 3 matrix [2,1,1; 1,2,0; 1,0,1]. E.g., M^3 * [1,0,0] = [19,14,9]; right term = 9 = a(3). - Gary W. Adamson, Apr 04 2006

A080934 Square array read by antidiagonals of number of Catalan paths (nonnegative, starting and ending at 0, step +/-1) of 2n steps with all values less than or equal to k.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 4, 1, 0, 1, 1, 2, 5, 8, 1, 0, 1, 1, 2, 5, 13, 16, 1, 0, 1, 1, 2, 5, 14, 34, 32, 1, 0, 1, 1, 2, 5, 14, 41, 89, 64, 1, 0, 1, 1, 2, 5, 14, 42, 122, 233, 128, 1, 0, 1, 1, 2, 5, 14, 42, 131, 365, 610, 256, 1, 0, 1, 1, 2, 5, 14, 42, 132, 417, 1094, 1597, 512, 1, 0
Offset: 0

Views

Author

Henry Bottomley, Feb 25 2003

Keywords

Comments

Number of permutations in S_n avoiding both 132 and 123...k.
T(n,k) = number of rooted ordered trees on n nodes of depth <= k. Also, T(n,k) = number of {1,-1} sequences of length 2n summing to 0 with all partial sums are >=0 and <= k. Also, T(n,k) = number of closed walks of length 2n on a path of k nodes starting from (and ending at) a node of degree 1. - Mitch Harris, Mar 06 2004
Also T(n,k) = k-th coefficient in expansion of the rational function R(n), where R(1) = 1, R(n+1) = 1/(1-x*R(n)), which means also that lim(n->inf,R(n)) = g.f. of Catalan numbers (A000108) wherever it has real value (see Mansour article). - Clark Kimberling and Ralf Stephan, May 26 2004
Row n of the array gives Taylor series expansion of F_n(t)/F_{n+1}(t), where F_n(t) are the Fibonacci polynomials defined in A259475 [Kreweras, 1970]. - N. J. A. Sloane, Jul 03 2015

Examples

			T(3,2) = 4 since the paths of length 2*3 (7 points) with all values less than or equal to 2 can take the routes 0101010, 0101210, 0121010 or 0121210, but not 0123210.
From _Peter Luschny_, Aug 27 2014: (Start)
Trees with n nodes and height <= h:
h\n  1  2  3  4   5   6    7    8     9    10     11
---------------------------------------------------------
[ 1] 1, 0, 0, 0,  0,  0,   0,   0,    0,    0,     0, ...  A063524
[ 2] 1, 1, 1, 1,  1,  1,   1,   1,    1,    1,     1, ...  A000012
[ 3] 1, 1, 2, 4,  8, 16,  32,  64,  128,  256,   512, ...  A011782
[ 4] 1, 1, 2, 5, 13, 34,  89, 233,  610, 1597,  4181, ...  A001519
[ 5] 1, 1, 2, 5, 14, 41, 122, 365, 1094, 3281,  9842, ...  A124302
[ 6] 1, 1, 2, 5, 14, 42, 131, 417, 1341, 4334, 14041, ...  A080937
[ 7] 1, 1, 2, 5, 14, 42, 132, 428, 1416, 4744, 16016, ...  A024175
[ 8] 1, 1, 2, 5, 14, 42, 132, 429, 1429, 4846, 16645, ...  A080938
[ 9] 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4861, 16778, ...  A033191
[10] 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16795, ...  A211216
---------------------------------------------------------
The generating functions are listed in A211216. Note that the values up to the main diagonal are the Catalan numbers A000108.
(End)
		

Crossrefs

Cf. A000108, A079214, A080935, A080936. Rows include A000012, A057427, A040000 (offset), columns include (essentially) A000007, A000012, A011782, A001519, A007051, A080937, A024175, A080938, A033191, A211216. Main diagonal is A000108.
Cf. A094718 (involutions). Cf. also A259475.

Programs

  • Maple
    # As a triangular array:
    b:= proc(x, y, k) option remember; `if`(y>min(k, x) or y<0, 0,
          `if`(x=0, 1, b(x-1, y-1, k)+ b(x-1, y+1, k)))
        end:
    A:= (n, k)-> b(2*n, 0, k):
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Aug 06 2012
    # As a square array:
    A := proc(n,k) option remember; local j; if n = 1 then 1 elif k = 1 then 0 else add(A(n-j,k)*A(j,k-1), j=1..n-1) fi end:
    linalg[matrix](10, 12, (n,k) -> A(k,n)); # Peter Luschny, Aug 27 2014
  • Mathematica
    A[n_, k_] := A[n, k] = Which[n == 1, 1, k == 1, 0, True, Sum[A[n-j, k]*A[j, k-1], {j, 1, n-1}]]; Table[A[k-n+1, n], {k, 1, 13}, {n, k, 1, -1}] // Flatten (* Jean-François Alcover, Feb 19 2015, after Peter Luschny *)
  • PARI
    A(N, K) = {
      my(m = matrix(N, K, n, k, n==1));
      for (n = 2, N,
      for (k = 2, K,
           m[n,k] = sum(i = 1, n-1, m[n-i,k] * m[i,k-1])));
      return(m);
    }
    A(11,10)~  \\ Gheorghe Coserea, Jan 13 2016

Formula

T(n, k) = Sum_{0A080935(n, k) = T(n, k-1)+A080936(n, k); for k>=n T(n, k) = A000108(n).
T(n, k) = 2^(2n+1)/(k+2) * Sum_{i=1..k+1} (sin(Pi*i/(k+2))*cos(Pi*i/(k+2))^n)^2 for n>=1. - Herbert Kociemba, Apr 28 2004
G.f. of n-th row: B(n)/B(n+1) where B(j)=[(1+sqrt(1-4x))/2]^j-[(1-sqrt(1-4x))/2]^j.

A080938 Number of Catalan paths (nonnegative, starting and ending at 0, step +-1) of 2*n steps with all values less than or equal to 7.

Original entry on oeis.org

1, 1, 2, 5, 14, 42, 132, 429, 1429, 4846, 16645, 57686, 201158, 704420, 2473785, 8704089, 30664890, 108126325, 381478030, 1346396146, 4753200932, 16783118309, 59266297613, 209302921830, 739203970773, 2610763825782, 9221050139566, 32568630376132
Offset: 0

Views

Author

Henry Bottomley, Feb 25 2003

Keywords

Comments

From Wolfdieter Lang, Mar 27 2020: (Start)
a(n) also gives the upper left entry of the n-th power of the 4 X 4 tridiagonal matrix M_4, given in A332602: M_4 = Matrix([1,1,0,0], [1,2,1,0], [0,1,2,1], [0,0,1,2]): a(n) = (M_4)^n[1,1]. Proof from the formula for (M_4)^n, given in a comment in A094256, derived from the Cayley-Hamilton theorem, which leads to the recurrence. The formula for a(n) in terms of A094256 is given below.
For A094256(n+1)/A094256(n), like for A094829(n+1)/A094829(n), the limit for n -> infinity is rho(9)^2 = A332438 = 3.53208888..., with rho(9) = 2*cos(Pi/9) = A332437. Therefore the formula of a(n) in terms of A094256 shows that the same limit is reached for a(n+1)/a(n). See this conjecture by Gary W. Adamson in A332602.
(End)

Examples

			1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 42*x^5 + 132*x^6 + 429*x^7 + ...
		

Crossrefs

Cf. A000007, A000012, A011782, A001519, A007051, A080937, A024175, A033191 which essentially provide the same sequence for different limits and tend to A000108.
Cf. A211216, A094826 (first differences), A094829, A094829, A332602, A332437, A332438.

Programs

  • Magma
    I:=[1,1,2,5]; [n le 4 select I[n] else 7*Self(n-1)-15*Self(n-2)+10*Self(n-3)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Nov 30 2018
  • Mathematica
    CoefficientList[Series[(1 - 2 x) (2 x^2 - 4 x + 1) / ((x - 1) (x^3 - 9 x^2 + 6 x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Nov 30 2018 *)
    LinearRecurrence[{7, -15, 10, -1}, {1, 1, 2, 5}, 30] (* Jean-François Alcover, Jan 07 2019 *)
  • PARI
    {a(n) = local(A); A = 1; for( i=1, 7, A = 1 / (1 - x*A)); polcoeff( A + x * O(x^n), n)} /* Michael Somos, May 12 2012 */
    

Formula

a(n) = A080934(n,7).
G.f.: -(2*x - 1)*(2*x^2 - 4*x + 1) / ( (x - 1)*(x^3 - 9*x^2 + 6*x - 1) ). - Ralf Stephan, May 13 2003
a(n) = 7*a(n-1) - 15*a(n-2) + 10*a(n-3) - a(n-4). - Herbert Kociemba, Jun 13 2004
G.f.: 1 / (1 - x / (1 - x / (1 - x / (1 - x / (1 - x / (1 - x / (1 - x))))))). - Michael Somos, May 12 2012
a(n) = 5*b(n-2) - 21*b(n-3) + 19*b(n-4) - 2*b(n-5), for n >= 0, with b(n) = A094256(n), for n >= -5. See a comment in A094256 for this offset, and the above comment. - Wolfdieter Lang, Mar 28 2020

A332602 Tridiagonal matrix M read by antidiagonals: main diagonal is 1,2,2,2,2,..., two adjacent diagonals are 1,1,1,1,1,...

Original entry on oeis.org

1, 1, 1, 0, 2, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

N. J. A. Sloane, Mar 06 2020, following a suggestion from Gary W. Adamson

Keywords

Comments

From Gary W. Adamson, Mar 11 2020: (Start)
The upper left entry of M^n gives the Catalan numbers A000108. Extracting 2 X 2, 3 X 3, and 4 X 4 submatrices from M; then generating sequences from the upper left entries of M^n, we obtain the following sequences:
1, 1, 2, 5, 13, ... = A001519 and the convergent is 2.61803... = 2 + 2*cos(2*Pi/5) = (2*cos(Pi/5))^2.
1, 1, 2, 5, 14, 42, 131, ... = A080937 and the convergent is 3.24697... = 2 + 2*cos(2*Pi/7) = (2*cos(Pi/7))^2.
1, 1, 2, 5, 14, 42, 132, 429, 1429, ... = A080938 and the convergent is 3.53208... = 2 + 2*cos(2*Pi/9) = (2*cos(Pi/9))^2. (End)
The characteristic polynomial for the N X N main submatrix M_N is Phi(N, x) = S(N, 2-x) - S(N-1, 2-x), with Chebyshev's S polynomial (see A049310) evaluated at 2-x. Proof by determinant expansion, to obtain the recurrence Phi(N, x) - (x-2)*Phi(N-1, x) - Phi(N-2, x), for N >= 2, and Phi(0, x) = 1 and Phi(1, x) = 1 - x, that is Phi(-1, x) = 1. The trace is tr(M_N) = 1 + 2^(N-1) = A000051(N-1), and Det(M_N) = 1. - Wolfdieter Lang, Mar 13 2020
The explicit form of the characteristic polynomial for the N X N main submatrix M_N is Phi(N, x) := Det(M_N - x*1_N) = Sum_{k=0..N} binomial(N+k, 2*k)*(-x)^k = Sum_{k=0..N} A085478(N, k)*(-x)^k, for N >= 0, with Phi(0, x) := 1. Proof from the recurrence given in the preceding comment. - Wolfdieter Lang, Mar 25 2020
For the proofs of the 2 X 2, 3 X 3 and 4 X 4 conjectures, see the comments in the respective A-numbers A001519, A080937 and A080938. - Wolfdieter Lang, Mar 30 2020
Replace the main diagonal 1,2,2,2,... of the matrix M with 1,0,0,0,...; 1,1,1,1,...; 1,3,3,3,...; 1,2,1,2,...; 1,2,3,4,...; 1,0,1,0...; and 1,1,0,0,1,1,0,0,.... Take powers of M and extract the upper left terms, resulting in respectively: A001405, A001006, A033321, A176677, A006789, A090344, and A007902. - Gary W. Adamson, Apr 12 2022
The statement that the upper left entry of M^n is a Catalan number is equivalent to Exercise 41 of R. Stanley, "Catalan Numbers." - Richard Stanley, Feb 28 2023
If the upper left 1 in matrix M is replaced with 3, taking powers of the resulting matrix and extracting the upper left terms apparently results in sequence A001700. - Gary W. Adamson, Apr 03 2023

Examples

			The matrix begins:
  1, 1, 0, 0, 0, ...
  1, 2, 1, 0, 0, ...
  0, 1, 2, 1, 0, ...
  0, 0, 1, 2, 1, ...
  0, 0, 0, 1, 2, ...
  ...
The first few antidiagonals are:
  1;
  1, 1;
  0, 2, 0;
  0, 1, 1, 0;
  0, 0, 2, 0, 0;
  0, 0, 1, 1, 0, 0;
  0, 0, 0, 2, 0, 0, 0;
  0, 0, 0, 1, 1, 0, 0, 0;
  0, 0, 0, 0, 2, 0, 0, 0, 0;
  0, 0, 0, 0, 1, 1, 0, 0, 0, 0;
  ...
Characteristic polynomial of the 3 X 3 matrix M_3: Phi(3, x) = 1 - 6*x + 5*x^2 - x^3, from {A085478(3, k)}_{k=0..3} = {1, 6, 5, 1}. - _Wolfdieter Lang_, Mar 25 2020
		

References

  • Richard P. Stanley, "Catalan Numbers", Cambridge University Press, 2015.

Crossrefs

Cf. A001333 (permanent of the matrix M).
Cf. A054142, A053123, A011973 (characteristic polynomials of submatrices of M).
Cf. A001700.

A202058 Number of ascent sequences avoiding the pattern 000.

Original entry on oeis.org

1, 1, 2, 4, 10, 27, 83, 277, 1015, 4007, 17047, 77451, 374889, 1923168, 10427250, 59544957, 357236992, 2245822801, 14762969601, 101264286082, 723499803180, 5375063821727, 41459660565329, 331546282841906, 2745163969235517, 23505333233440927, 207895424692608432
Offset: 0

Views

Author

N. J. A. Sloane, Dec 10 2011

Keywords

Comments

It appears that no formula or g.f. is known.

Crossrefs

Total number of ascent sequences is given by A022493. Number of ascent sequences avoiding 001 (and others) is A000079; 102 is A007051; 101 is A000108; 000 is A202058; 100 is A202059; 110 is A202060; 120 is A202061; 201 is A202062; 210 is A108304; 0123 is A080937; 0021 is A007317; 0000 is A317784.
Column k=2 of A294220.

Programs

  • Mathematica
    b[n_, i_, t_, p_, k_] := b[n, i, t, p, k] = If[n==0, 1, Sum[If[Coefficient[ p, x, j]==k, 0, b[n-1, j, t + If[j>i, 1, 0], p+x^j, k]], {j, 1, t+1}]];
    a[n_] := b[n, 0, 0, 0, Min[n, 2]];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 0, 17}] (* Jean-François Alcover, Sep 01 2018, after Alois P. Heinz in A294220 *)

Extensions

a(15)-a(17) from Alois P. Heinz, Nov 09 2012
a(18)-a(20) from Giovanni Resta, Jan 06 2014
a(21) from Vaclav Kotesovec, Aug 21 2018
a(22) from Vaclav Kotesovec, Aug 22 2018
More terms from Anthony Guttmann, Nov 04 2021
Showing 1-10 of 20 results. Next