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

A193147 Expansion of 1/(1 - x - 2*x^3 - x^5).

Original entry on oeis.org

1, 1, 1, 3, 5, 8, 15, 26, 45, 80, 140, 245, 431, 756, 1326, 2328, 4085, 7168, 12580, 22076, 38740, 67985, 119305, 209365, 367411, 644761, 1131476, 1985603, 3484490, 6114853, 10730820, 18831276, 33046585, 57992715, 101770120, 178594110, 313410816, 549997641
Offset: 0

Views

Author

Johannes W. Meijer, Jul 20 2011

Keywords

Comments

The Ze3 sums, see A180662 for the definition of these sums, of the "Races with Ties" triangle A035317 equal this sequence.
Number of tilings of a 5 X 2n rectangle with 5 X 1 pentominoes. - M. Poyraz Torcuk, Dec 18 2021

Crossrefs

Bisection of A003520.

Programs

  • Maple
    A193147 := proc(n) option remember: if n>=-4 and n<=-1 then 0 elif n=0 then 1 else procname(n-1) + 2*procname(n-3) + procname(n-5) fi: end: seq(A193147(n), n=0..32);
  • Mathematica
    Series[1/(1 - x - 2*x^3 - x^5), {x, 0, 32}] // CoefficientList[#, x]& (* Jean-François Alcover, Apr 02 2015 *)
  • Maxima
    a(n):=sum(sum(binomial(j,3*n-5*m+2*j)*binomial(2*m-n,j)*2^(3*n-5*m+2*j), j,0,2*m-n),m,floor((n+1)/2),n); /* Vladimir Kruchinin, Mar 10 2013 */

Formula

G.f.: 1/(1-x-2*x^3-x^5) = -1 / ( (1+x+x^2)*(x^3-x^2+2*x-1) ).
a(n) = a(n-1) + 2*a(n-3) + a(n-5) with a(n) = 0 for n= -4, -3, -2, -1 and a(0) = 1.
a(n) = (5*b(n+1) - 4*b(n) + 3*b(n-1) + 2*c(n) + 3*c(n-1))/7 with b(n) = A005314(n) and c(n) = A049347(n).
G.f.: 1 + x/(U(0)-x) where G(k)= 1 - x^2*(k+1)/(1 - 1/(1 + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 17 2012
a(n) = Sum_{m=floor((n+1)/2)..n} Sum_{j=0..2*m-n} C(j,3*n-5*m+2*j) * C(2*m-n,j) * 2^(3*n-5*m+2*j). - Vladimir Kruchinin, Mar 10 2013
With offset 1, the INVERT transform of (1 + 2x^2 + x^4). - Gary W. Adamson, Mar 30 2017
a(n) = Sum_{k=0..floor(2*n/5)} binomial(2*n-4*k,k). - Seiichi Manyama, Jun 14 2024

A023435 Dying rabbits: a(n) = a(n-1) + a(n-2) - a(n-5).

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 7, 11, 16, 24, 35, 52, 76, 112, 164, 241, 353, 518, 759, 1113, 1631, 2391, 3504, 5136, 7527, 11032, 16168, 23696, 34728, 50897, 74593, 109322, 160219, 234813, 344135, 504355, 739168, 1083304, 1587659, 2326828, 3410132, 4997792, 7324620, 10734753
Offset: 0

Views

Author

Keywords

Comments

Diagonal sums of Riordan array (1/(1-x), x(1+x+x^2)) yield a(n+1). - Paul Barry, Feb 16 2005
The Ca2 sums, see A180662 for the definition of these sums, of the "Races with Ties" triangle A035317 lead to this sequence. - Johannes W. Meijer, Jul 20 2011
Number of ordered partitions of (n-1) into parts less than or equal to 3, where the order of the 2's is unimportant. (see example). - David Neil McGrath, Apr 26 2015
Number of ordered partitions of (n-1) into parts less than or equal to 4, where the order of the 1's is unimportant.(see example). - David Neil McGrath, May 05 2015
List the partitions of n in nonincreasing order. Freeze the 1's and 2's in place and allow the other summands to vary their order without disturbing the 1's and 2's. The result is a(n+1). - Gregory L. Simay (based on correspondence with George E. Andrews), Jul 11 2016
Number of ordered partitions of n-1 where the order of the 1's and the 2's are unimportant. - Gregory L. Simay, Jul 18 2016

Examples

			There are 11 partitions of 6 into parts less than or equal to 3, where the order of 2's is unimportant, a(7)=11. These are (33),(321=231=312),(132=123=213),(3111),(1311),(1131),(1113),(222),(2211=1122=1221=2112=2121=1212),(21111=12111=11211=11121=11112),(111111). - _David Neil McGrath_, Apr 26 2015
There are 11 partitions of 6 into parts less than equal to 4, where the order of 1's is unimportant. These are (42),(24),(411=141=114),(33),(321=312=132),(231=213=123),(3111=1311=1131=1113),(222),(2211=1122=2112=1221=1212=2121),(21111=12111=11211=11121=11112),(111111). - _David Neil McGrath_, May 05 2015
There are a(9)=24 partitions of 8 where the 1's and 2's are frozen []: (8), (7[1]), (6[2]), (53), (35) (44), (6[1][1]), (5,[2][1]), (43[1]), (34[1]), (4[2][2]), (33[2][2]) (5[1][1][1]), (4[2][1][1]), (33[1][1]), (3[2][2][1]), ([2][2][2][2]), (4[1][1][1][1]), (3[2][1][1][1]), ([2][2][2][1][1]), (3[1][1][1][1][1]), ([2][2][1][1][1][1]), ([2][1][1][1][1][1][1]),([1][1][1][1][1][1][1][1]). - _Gregory L. Simay_, Jul 11 2016
		

Crossrefs

First differences are in A013979.
Cf. A077864 (bisection).

Programs

  • Magma
    I:=[0,1,1,2,3]; [n le 5 select I[n] else Self(n-1)+Self(n-2)-Self(n-5): n in [1..45]]; // Vincenzo Librandi, Apr 27 2015
    
  • Mathematica
    LinearRecurrence[{1, 1, 0, 0, -1}, {0, 1, 1, 2, 3}, 50] (* Vincenzo Librandi, Apr 27 2015 *)
  • PARI
    x='x+O('x^99); concat(0, Vec(x/((x-1)*(1+x)*(x^3+x-1)))) \\ Altug Alkan, Apr 09 2018

Formula

G.f.: x / ( (x-1)*(1+x)*(x^3+x-1) ). - R. J. Mathar, Nov 28 2011

Extensions

More terms from Vincenzo Librandi, Apr 27 2015

A158909 Riordan array (1/((1-x)(1-x^2)), x/(1-x)^2). Triangle read by rows, T(n,k) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 2, 7, 5, 1, 3, 13, 16, 7, 1, 3, 22, 40, 29, 9, 1, 4, 34, 86, 91, 46, 11, 1, 4, 50, 166, 239, 174, 67, 13, 1, 5, 70, 296, 553, 541, 297, 92, 15, 1, 5, 95, 496, 1163, 1461, 1068, 468, 121, 17, 1, 6, 125, 791, 2269, 3544, 3300, 1912, 695, 154, 19, 1
Offset: 0

Views

Author

Paul Barry, Mar 30 2009

Keywords

Comments

Diagonal sums are the Jacobsthal numbers A001045.
Transforms r^n into the symmetric third-order sequence with g.f. 1/(1-(r+1)x-(r+1)x^2+x^3), see the formulas.
From Wolfdieter Lang, Oct 22 2019: (Start)
The signed triangle t(n, k) = (-1)^(n-k)*T(n, k) appears in the expansion [n+2, 2]q / q^n = Sum{k=0} t(n, k)*y^(2*k), with y = q^(1/2) + q^(-1/2), where [n+2, 2]_q are q-binomial coefficients (see A008967, but with a different offset). The formula is [n+2, 2]_q / q^n = S(n+1, y)*S(n, y)/y with Chebyshev S polynomials (A049310). This is a polynomial in y^2 but not in q after replacement of the given y = y(q).
The A-sequence for this Riordan triangle is A(n) = (-1)^n*A115141(n) with o.g.f A(x) = 1 + x*(1 + c(-x)), with c(x) generating A000108 (Catalan).
The Z-sequence is z(n) = (-1)^(n+1)*A071724(n), for n >= 1 and z(0) = 1. The o.g.f. is Z(x) = 1 + x*c(-x)^3. See A071724 for a link on A- and Z-sequences, and their use for the recurrence. (End)
T(n,k) is the number of tilings of a (2*n+1)-board (a 1 X (2*n+1) rectangular board) using 2*k+1 squares and 2*(n-k) (1,1)-fences. A (1,1)-fence is a tile composed of two squares separated by a gap of width 1. - Michael A. Allen, Mar 20 2021

Examples

			From _Wolfdieter Lang_, Oct 22 2019: (Start)
The triangle T(n, k) begins:
  n\k  0   1   2    3    4    5    6   7   8  9 10 ...
  ----------------------------------------------------
  0:   1
  1:   1   1
  2:   2   3   1
  3:   2   7   5    1
  4:   3  13  16    7    1
  5:   3  22  40   29    9    1
  6:   4  34  86   91   46   11    1
  7:   4  50 166  239  174   67   13   1
  8:   5  70 296  553  541  297   92  15   1
  9:   5  95 496 1163 1461 1068  468 121  17  1
  10:  6 125 791 2269 3544 3300 1912 695 154 19  1
  ...
----------------------------------------------------------------------------
Recurrence: T(5, 2) = 16 + 13 + 5 + 7 - 1 = 40, and T(5, 0) = 3 + 2 - 2 = 3. [using _Philippe Deléham_'s Nov 12 2013 recurrence]
Recurrence from A-sequence [1, 2, -1, 2, -5, ...]: T(5, 2) = 1*13 + 2*16 - 1*7 + 2*1 = 40.
Recurrence from Z-sequence [1, 1, -3, 9, -28, ...]: T(5, 0) = 1*3 + 1*13 - 3*16 + 9*7 - 28*1 = 3. (End)
		

Crossrefs

Programs

  • Magma
    [(&+[(-1)^(j+n-k)*Binomial(2*k+j+1, j): j in [0..n-k]]): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 18 2021
  • Maple
    T := (n,k) -> binomial(k+n+2, n-k+1)*hypergeom([1, k+n+3], [n-k+2], -1) + (-1)^(n-k)/4^(k+1):
    seq(seq(simplify(T(n,k)), k=0..n), n=0..9); # Peter Luschny, Oct 31 2019
  • Mathematica
    Table[Sum[(-1)^(j+n-k)*Binomial[j+2*k+1, j], {j,0,n-k}], {n,0,12}, {k,0,n}] // Flatten (* G. C. Greubel, Mar 18 2021 *)
  • Sage
    flatten([[sum((-1)^(j+n-k)*binomial(j+2*k+1, j) for j in (0..n-k)) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 18 2021
    

Formula

Sum_{k=0..n} T(n,k) = Fibonacci(n+1)*Fibonacci(n+2) = A001654(n+1).
From Johannes W. Meijer, Jul 20 2011: (Start)
T(n, k) = Sum_{i=0..n-k} (-1)^(i+n-k) * binomial(i+2*k+1, i).
T(n, k) = A035317(n+k, n-k) = A092879(n, n-k).
Sum_{k=0..n} T(n, k)*r^k = coeftayl(1/(1-(r+1)*x-(r+1)*x^2+x^3), x=0, n). [Barry] (End)
T(n, k) = T(n-1, k) + T(n-1, k-1) + T(n-2, k) + T(n-2, k-1) - T(n-3, k), T(0, 0) = 1, T(n, k) = 0 if k<0 or if k>n. - Philippe Deléham, Nov 12 2013
From Wolfdieter Lang, Oct 22 2019: (Start)
O.g.f. for the row polynomials (that is for the triangle): G(z, x) = 1/((1 + z)*(1 - (x + 2)*z + z^2)), and
O.g.f. for column k: x^k/((1+x)*(1-x)^(2*(k+1))) (Riordan property). (End)
T(n, k) = binomial(k + n + 2, n - k + 1)*hypergeom([1, k + n + 3], [n - k + 2], -1) + (-1)^(n - k)/4^(k + 1). - Peter Luschny, Oct 31 2019
From Michael A. Allen, Mar 20 2021: (Start)
T(n,k) = A335964(2*n+1,n-k).
T(n,k) = T(n-2,k) + binomial(n+k,2*k). (End)

A080242 Table of coefficients of polynomials P(n,x) defined by the relation P(n,x) = (1+x)*P(n-1,x) + (-x)^(n+1).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 3, 4, 2, 1, 1, 4, 7, 6, 3, 1, 5, 11, 13, 9, 3, 1, 1, 6, 16, 24, 22, 12, 4, 1, 7, 22, 40, 46, 34, 16, 4, 1, 1, 8, 29, 62, 86, 80, 50, 20, 5, 1, 9, 37, 91, 148, 166, 130, 70, 25, 5, 1, 1, 10, 46, 128, 239, 314, 296, 200, 95
Offset: 0

Views

Author

Paul Barry, Feb 12 2003

Keywords

Comments

Values generate solutions to the recurrence a(n) = a(n-1) + k(k+1)* a(n-2), a(0)=1, a(1) = k(k+1)+1. Values and sequences associated with this table are included in A072024.

Examples

			Rows are {1}, {1,1,1}, {1,2,2}, {1,3,4,2,1}, {1,4,7,6,3}, ... This is the same as table A035317 with an extra 1 at the end of every second row.
Triangle begins
  1;
  1,  1,  1;
  1,  2,  2;
  1,  3,  4,  2,  1;
  1,  4,  7,  6,  3;
  1,  5, 11, 13,  9,  3,  1;
  1,  6, 16, 24, 22, 12,  4;
  1,  7, 22, 40, 46, 34, 16,  4,  1;
  1,  8, 29, 62, 86, 80, 50, 20,  5;
		

Crossrefs

Similar to the triangles A059259, A035317, A108561, A112555. Cf. A059260.
Cf. A001045 (row sums).

Programs

  • Mathematica
    Table[CoefficientList[Series[((1+x)^(n+2) -(-1)^n*x^(n+2))/(1+2*x), {x, 0, n+2}], x], {n, 0, 10}]//Flatten (* G. C. Greubel, Feb 18 2019 *)

Formula

Rows are generated by P(n,x) = ((x+1)^(n+2) - (-x)^(n+2))/(2*x+1).
The polynomials P(n,-x), n > 0, satisfy a Riemann hypothesis: their zeros lie on the vertical line Re x = 1/2 in the complex plane.
O.g.f.: (1+x*t+x^2*t)/((1+x*t)(1-t-x*t)) = 1 + (1+x+x^2)*t + (1+2x+2x^2)*t^2 + ... . - Peter Bala, Oct 24 2007
T(n,k) = if(k<=2*floor((n+1)/2), Sum_{j=0..floor((n+1)/2)} binomial(n-2j,k-2j), 0). - Paul Barry, Apr 08 2011 (This formula produces the odd numbered rows correctly, but not the even. - G. C. Greubel, Feb 22 2019)

A181532 a(0) = 0, a(1) = 1, a(2) = 1, a(3) = 2; a(n) = a(n-1) + a(n-2) + a(n-4).

Original entry on oeis.org

0, 1, 1, 2, 3, 6, 10, 18, 31, 55, 96, 169, 296, 520, 912, 1601, 2809, 4930, 8651, 15182, 26642, 46754, 82047, 143983, 252672, 443409, 778128, 1365520, 2396320, 4205249, 7379697, 12950466, 22726483, 39882198, 69988378, 122821042, 215535903, 378239143, 663763424
Offset: 0

Views

Author

Gary W. Adamson, Oct 28 2010

Keywords

Comments

Essentially the same as A060945: a(0)=0 and a(n)=A060945(n-1) for n>=1.
lim(n->infinity) a(n+1)/a(n) = A109134 = 1.754877666..., the square of the absolute value of one of the complex-valued roots of the characteristic polynomial. [R. J. Mathar, Nov 01 2010]
The Ze4 sums, see A180662 for the definition of these sums, of the ‘Races with Ties’ triangle A035317 lead to this sequence. [Johannes W. Meijer, Jul 20 2011]

Examples

			a(7) = 18 = a(6) + a(5) + a(3) = 10 + 6 + 2.
a(7) = 18 = (1 0, 2, 0, 2, 0, 3) dot (10, 6, 3, 2, 1, 1, 1) = (10 + 3 + 2 + 3).
		

Crossrefs

All of A060945, A077930, A181532 are variations of the same sequence. - N. J. A. Sloane, Mar 04 2012

Programs

  • Mathematica
    LinearRecurrence[{1,1,0,1},{0,1,1,2},40] (* Harvey P. Dale, Jun 20 2015 *)

Formula

a(0) = 0, a(1) = 1, a(2) = 1, a(3) = 2; a(n) = a(n-1) + a(n-2) + a(n-4).
G.f.: x/(1-x-x^2-x^4). [Franklin T. Adams-Watters, Feb 25 2011]
a(n) = |A077930(n)| = ( |A056016(n+2)|-(-1)^n)/5. [R. J. Mathar, Oct 29 2010]
a(n) = A060945(n-1), n>1. [R. J. Mathar, Nov 03 2010]

Extensions

Values from a(9) on changed by R. J. Mathar, Oct 29 2010
Edited and a(0) added by Franklin T. Adams-Watters, Feb 25 2011

A128176 A128174 * A007318.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 4, 3, 1, 3, 6, 7, 4, 1, 3, 9, 13, 11, 5, 1, 4, 12, 22, 24, 16, 6, 1, 4, 16, 34, 46, 40, 22, 7, 1, 5, 20, 50, 80, 86, 62, 29, 8, 1, 5, 25, 70, 130, 166, 148, 91, 37, 9, 1, 6, 30, 95, 200, 296, 314, 239, 128, 46, 10, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 17 2007

Keywords

Comments

Row Sums = A000975: (1, 2, 5, 10, 21, 42, 85, 170, ...).
From Peter Bala, Aug 14 2014: (Start)
Riordan array ( 1/((1 - x^2)*(1 - x)), x/(1 - x) ).
Let B_n be the set of length n nonzero binary words ending in an even number (possibly 0) of 0's. Then T(n,k) is the number of words in B_n having k 1's. An example is given below. (End)

Examples

			First few rows of the triangle are:
  1;
  1,  1;
  2,  2,  1;
  2,  4,  3,  1;
  3,  6,  7,  4,  1;
  3,  9, 13, 11,  5,  1;
  4, 12, 22, 24, 16,  6,  1;
  4, 16, 34, 46, 40, 22,  7,  1;
  ...
From _Peter Bala_, Aug 14 2014: (Start)
Row 4: [2,4,3,1].
k      Binary words in B_4 with k 1's       Number
- - - - - - - - - - - - - - - - - - - - - - - - - -
1      0001, 0100                            2
2      0011, 0101, 1001, 1100                4
3      0111, 1011, 1101                      3
4      1111                                  1
- - - - - - - - - - - - - - - - - - - - - - - - - -
The infinitesimal generator matrix begins
   0
   1  0
   1  2  0
  -1  1  3  0
   1 -1  1  4  0
  -1  1 -1  1  5  0
  ...
Cf. A132440. (End)
		

Crossrefs

Cf. A035317 (mirror). [Johannes W. Meijer, Jul 20 2011]

Programs

  • Mathematica
    (* Dot product of two lower triangular matrices *)
    dotRow[r_, s_, n_] := Map[Sum[r[n, k] s[k, #], {k, #, n}]&, Range[0, n]]
    dotTriangle[r_, s_, n_] := Map[dotRow[r, s, #]&, Range[0, n]]
    (* The pure function in the first argument computes A128174 *)
    a128176[r_] := dotTriangle[If[EvenQ[#1 + #2], 1, 0]&, Binomial, r]
    TableForm[a128176[7]] (* triangle *)
    Flatten[a128176[9]] (* data *) (* Hartmut F. W. Hoft, Mar 15 2017 *)
    T[n_, n_] := 1; T[n_, 0] := 1 + Floor[n/2]; T[n_, k_] := T[n, k] = T[n - 1, k - 1] + T[n - 1, k]; Table[T[n, k], {n,0,20}, {k, 0, n}] // Flatten (* G. C. Greubel, Sep 30 2017 *)
  • PARI
    for(n=0, 10, for(k=0,n, print1(sum(i=0,floor(n/2), binomial(n - 2*i,k)), ", "))) \\ G. C. Greubel, Sep 30 2017

Formula

A128174 * A007318 (Pascal's triangle), as infinite lower triangular matrices.
From Peter Bala, Aug 14 2014: (Start)
Working with a row and column offset of 0 we have T(n,k) = Sum_{i = 0..floor(n/2)} binomial(n - 2*i,k).
O.g.f.: 1/( (1 - z^2)*(1 - z*(1 + x)) ) = Sum_{n >= 0} R(n,x)*z^n = 1 + (1 + x)*z + (2 + 2*x + x^2)*z^2 + ....
The row polynomials satisfy R(n+2,x) - R(n,x) = (1 + x)^(n+1). (End)
From Hartmut F. W. Hoft, Mar 15 2017: (Start)
Using offset 0, the triangle has the Pascal Triangle recursion pattern:
T(n, 0) = 1 + floor(n/2) and T(n, n) = 1, for n >= 0;
T(n, k) = T(n-1, k-1) + T(n-1, k) for n > 0 and 0 < k < n. (End)

A230447 T(n, k) = T(n-1, k) + T(n-1, k-1) + A230135(n, k) with T(n, 0) = A008619(n) and T(n, n) = A080239(n+1), n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 4, 5, 3, 3, 6, 9, 8, 6, 3, 9, 16, 17, 14, 9, 4, 12, 25, 33, 32, 23, 15, 4, 16, 38, 58, 65, 55, 39, 24, 5, 20, 54, 96, 124, 120, 94, 63, 40, 5, 25, 75, 150, 220, 244, 215, 157, 103, 64, 6, 30, 100, 225, 371, 464, 459, 372, 261, 167, 104
Offset: 0

Views

Author

Johannes W. Meijer, Oct 19 2013

Keywords

Comments

The terms in the right hand columns of triangle T(n, k) and the terms in the rows of the square array Tsq(n, k) represent the Kn1p sums of the ‘Races with Ties’ triangle A035317.
For the definitions of the Kn1p sums see A180662. This sequence is related to A230448.
The first few row sums are: 1, 2, 6, 14, 32, 68, 144, 299, 616, 1258, 2559, 5185, 10478, … .

Examples

			The first few rows of triangle T(n, k) n >= 0 and 0 <= k <= n.
n/k 0   1   2    3    4     5     6     7
------------------------------------------------
0|  1
1|  1,  1
2|  2,  2,  2
3|  2,  4,  5,   3
4|  3,  6,  9,   8,   6
5|  3,  9, 16,  17,  14,    9
6|  4, 12, 25,  33,  32,   23,    15
7|  4, 16, 38,  58,  65,   55,    39,   24
The triangle as a square array Tsq(n, k) = T(n+k, k), n >= 0 and k >= 0.
n/k 0   1   2    3    4     5     6     7
------------------------------------------------
0|  1,  1,  2,   3,   6,    9,   15,   24
1|  1,  2,  5,   8,  14,   23,   39,   63
2|  2,  4,  9,  17,  32,   55,   94,  157
3|  2,  6, 16,  33,  65,  120,  215,  372
4|  3,  9, 25,  58, 124,  244,  459,  831
5|  3, 12, 38,  96, 220,  464,  924, 1755
6|  4, 16, 54, 150, 371,  835, 1759, 3514
7|  4, 20, 75, 225, 596, 1431, 3191, 6705
		

Crossrefs

Programs

  • Maple
    T := proc(n, k): add(A035317(n-i, n-k+i), i=0..floor(k/2)) end: A035317 := proc(n, k): add((-1)^(i+k) * binomial(i+n-k+1, i), i=0..k) end: seq(seq(T(n, k), k=0..n), n=0..10); # End first program.
    T := proc(n, k) option remember: if k=0 then return(A008619(n)) elif k=n then return(A080239(n+1)) else A230135(n, k) + procname(n-1, k) + procname(n-1, k-1) fi: end: A008619 := n -> floor(n/2) +1: A080239 := n -> add(combinat[fibonacci](n-4*k), k=0..floor((n-1)/4)): A230135 := proc(n, k): if ((k mod 4 = 2) and (n mod 2 = 1)) or ((k mod 4 = 0) and (n mod 2 = 0)) then return(1) else return(0) fi: end: seq(seq(T(n, k), k=0..n), n=0..10); # End second program.

Formula

T(n, k) = T(n-1, k) + T(n-1, k-1) + A230135(n, k) with T(n, 0) = A008619(n) and T(n, n) = A080239(n+1), n >= 0 and 0 <= k <= n.
T(n, k) = sum(A035317(n-i, n-k+i), i = 0..floor(k/2)), n >= 0 and 0 <= k <= n.
The triangle as a square array Tsq(n, k) = T(n+k, k), n >= 0 and k >= 0.
Tsq(n, k) = sum(A035317(n+k-i, n+i), i=0..floor(k/2)), n >= 0 and k >= 0.
Tsq(n, k) = A080239(2*n+k+1) - sum(A035317(2*n+k-i, i), i=0..n-1).
The G.f. generates the terms in the n-th row of the square array Tsq(n, k).
G.f.: a(n)/(4*(x-1)) + 1/(4*(x+1)) + (-1)^n*(x+2)/(10*(x^2+1)) - (A000032(2*n+3) + A000032(2*n+2)*x)/(5*(x^2+x-1)) + sum((-1)^(k+1) * A064831(n-k+1)/((x-1)^k), k= 2..n), n >= 0, with a(n) = A064831(n+1) + 2*A064831(n) - 2*A064831(n-1) + A064831(n-2).

A092879 Triangle of coefficients of the product of two consecutive Fibonacci polynomials.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 5, 7, 2, 1, 7, 16, 13, 3, 1, 9, 29, 40, 22, 3, 1, 11, 46, 91, 86, 34, 4, 1, 13, 67, 174, 239, 166, 50, 4, 1, 15, 92, 297, 541, 553, 296, 70, 5, 1, 17, 121, 468, 1068, 1461, 1163, 496, 95, 5, 1, 19, 154, 695, 1912, 3300, 3544, 2269, 791, 125, 6, 1, 21, 191
Offset: 0

Views

Author

Michael Somos, Mar 10 2004

Keywords

Comments

The Fibonacci polynomials are defined by F(0,x) = 1, F(1,x) = 1 and F(n, x) = F(n-1, x) + x*F(n-2, x).
This is also the reflected triangle of coefficients of the polynomials defined by the recursion: c0=-1; p(x, n) = (2 + c0 - x)*p(x, n - 1) + (-1 - c0*(2 - x))*p(x, n - 2) + c0*p(x, n - 3). - Roger L. Bagula, Apr 09 2008

Examples

			Triangle begins;
  1;
  1,1;
  1,3,2;
  1,5,7,2;
  1,7,16,13,3;
  1,9,29,40,22,3;
  ...
F(3,x) = 1 + 2*x and F(4,x) = 1 + 3*x + x^2 so F(3,x)*F(4,x)=(1 + 3*x + x^2)*(1 + 2*x) = 1 + 5*x + 7*x^2 + 2*x^3 leads to T(3,k) = [1,5,7,2].
		

Crossrefs

Row sums are A001654(n+1).

Programs

  • Maple
    T:=proc(n,k): add((-1)^(i+k)*binomial(i+2*n-2*k+1,i), i=0..k) end: seq(seq(T(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Jul 20 2011
    T:=proc(n,k): coeff(F(n, x)*F(n+1, x), x, k) end: F:=proc(n, x) option remember: if n=0 then 1 elif n=1 then 1 else procname(n-1, x) + x*procname(n-2, x) fi: end: seq(seq(T(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Jul 20 2011
  • Mathematica
    c0 = -1; p[x, -1] = 0; p[x, 0] = 1; p[x, 1] = 2 - x + c0; p[x_, n_] :=p[x, n] = (2 + c0 -x)*p[x, n - 1] + (-1 - c0 (2 - x))*p[x, n - 2] + c0*p[x, n - 3]; Table[ExpandAll[p[x, n]], {n, 0, 10}]; a = Table[Reverse[CoefficientList[p[x, n], x]], {n, 0, 10}]; Flatten[a] (* Roger L. Bagula, Apr 09 2008 *)
  • PARI
    T(n,k)=local(m);if(k<0 || k>n,0,n++; m=contfracpnqn(matrix(2,n,i,j,x)); polcoeff(m[1,1]*m[2,1]/x^n,n-k))

Formula

From Johannes W. Meijer, Jul 20 2011: (Start)
T(n, k) = Sum_{i=0..k} (-1)^(i+k)*binomial(i+2*n-2*k+1, i).
T(n, k) = A035317(2*n-k, k) = A158909(n, n-k.) (End)
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k-1) + T(n-2,k-2) - T(n-3,k-3), T(0,0) = 1, T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Nov 12 2013

Extensions

Edited and information added by Johannes W. Meijer, Jul 20 2011

A190525 Number of n-step one-sided prudent walks, avoiding exactly two consecutive west steps (can have three or more west steps).

Original entry on oeis.org

1, 3, 6, 15, 34, 80, 185, 431, 1001, 2328, 5411, 12580, 29244, 67985, 158045, 367411, 854126, 1985603, 4615966, 10730820, 24946129, 57992715, 134816705, 313410816, 728591751, 1693770328, 3937538296, 9153665985, 21279691689, 49469281395
Offset: 0

Views

Author

Shanzhen Gao, May 11 2011

Keywords

Comments

The Ze2 sums, see A180662 for the definition of these sums, of the 'Races with Ties' triangle A035317 leads to this sequence with a(-1) = 1; the recurrence relation confirms this value. - Johannes W. Meijer, Jul 20 2011
Number of tilings of a 5 X 3n rectangle with 5 X 1 pentominoes. - M. Poyraz Torcuk, Dec 25 2021

Examples

			a(2) = 6 since there are 6 such walks: NN, NW, WN, EE, EN, NE.
		

Programs

  • Magma
    I:=[1,3,6,15]; [n le 4 select I[n] else 2*Self(n-1) +Self(n-2) -Self(n-3) +Self(n-4): n in [1..40]]; // G. C. Greubel, Apr 17 2021
    
  • Maple
    A190525 := proc(n) option remember: if n=0 then 1 elif n=1 then 3 elif n=2 then 6 elif n=3 then 15 else 2*procname(n-1) + procname(n-2) - procname(n-3) + procname(n-4) fi: end: seq(A190525(n), n=0..29); # Johannes W. Meijer, Jul 20 2011
  • Mathematica
    LinearRecurrence[{2,1,-1,1}, {1,3,6,15}, 40] (* G. C. Greubel, Apr 17 2021 *)
  • Sage
    def A190525_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1+x-x^2+x^3)/(1-2*x-x^2+x^3-x^4) ).list()
    A190525_list(40) # G. C. Greubel, Apr 17 2021

Formula

G.f.: (1+x-x^2+x^3)/(1-2*x-x^2+x^3-x^4).
From Johannes W. Meijer, Jul 20 2011: (Start)
a(n) = 2*a(n-1) + a(n-2) - a(n-3) + a(n-4) with a(0) = 1, a(1) = 3, a(2) = 6 and a(3) = 15.
a(n) = (9*A095263(n+1) - 8*A095263(n) + 5*A095263(n-1) - 2*(-1)^n)/7. (End)

A193146 Expansion of 1/(1 - x - x^2 + x^3 - x^4 + x^6).

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 8, 10, 15, 20, 29, 39, 55, 75, 105, 144, 200, 275, 381, 525, 726, 1001, 1383, 1908, 2635, 3636, 5020, 6928, 9564, 13200, 18221, 25149, 34714, 47914, 66136, 91285, 126000, 173914, 240051
Offset: 0

Views

Author

Johannes W. Meijer, Jul 20 2011

Keywords

Comments

The Gi2 sums, see A180662 for the definition of these sums, of the "Races with Ties" triangle A035317 equal this sequence.

Crossrefs

Programs

  • GAP
    a:=[1,1,2,2,4,5];; for n in [7..40] do a[n]:=a[n-1]+a[n-2]-a[n-3]+a[n-4]-a[n-6]; od; a; # G. C. Greubel, Jan 01 2020
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!(1/(1-x-x^2+x^3-x^4+x^6))); // Bruno Berselli, Jul 22 2011
    
  • Maple
    A193146 := proc(n) option remember: if n>=-5 and n<=-1 then 0 elif n=0 then 1 else procname(n-1) + procname(n-2) - procname(n-3) + procname(n-4) - procname(n-6) fi: end: seq(A193146(n), n=0..40);
  • Mathematica
    CoefficientList[Series[1/(1-x-x^2+x^3-x^4+x^6), {x, 0, 40}], x] (* Michael De Vlieger, Dec 24 2019 *)
    LinearRecurrence[{1,1,-1,1,0,-1},{1,1,2,2,4,5},50] (* Harvey P. Dale, Mar 27 2022 *)
  • Maxima
    makelist(coeff(taylor(1/(1-x-x^2+x^3-x^4+x^6), x, 0, n), x, n), n, 0, 40); /* Bruno Berselli, Jul 22 2011 */
    
  • PARI
    Vec(1/(1-x-x^2+x^3-x^4+x^6) +O(x^40)) /* show terms */ \\ Bruno Berselli, Jul 22 2011
    
  • Sage
    def A193146_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1-x-x^2+x^3-x^4+x^6) ).list()
    A193146_list(40) # G. C. Greubel, Jan 01 2020
    

Formula

G.f.: 1/(1 - x - x^2 + x^3 - x^4 + x^6).
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-6) with a(n) = 0 for n = -5, -4, -3, -2, -1 and a(0) = 1.
a(n) = b(n) + b(n-1) + b(n-3) - (1-(-1)^n)/2 with b(n) = A003269(n) and b(-3) = b(-2) = b(-1) = 0.
a(n) = Sum_{k=0..floor(n/2)} binomial(floor(n-3*k/2)+1, n-2*k+1). - Taras Goy, Dec 24 2019
Previous Showing 11-20 of 23 results. Next