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 10 results.

A126473 Number of strings over a 5 symbol alphabet with adjacent symbols differing by three or less.

Original entry on oeis.org

1, 5, 23, 107, 497, 2309, 10727, 49835, 231521, 1075589, 4996919, 23214443, 107848529, 501037445, 2327695367, 10813893803, 50238661313, 233396326661, 1084301290583, 5037394142315, 23402480441009, 108722104190981, 505095858086951, 2346549744920747
Offset: 0

Views

Author

R. H. Hardin, Dec 27 2006

Keywords

Comments

[Empirical] a(base,n) = a(base-1,n) + 7^(n-1) for base >= 3n-2; a(base,n) = a(base-1,n) + 7^(n-1)-2 when base = 3n-3.
From Johannes W. Meijer, Aug 01 2010: (Start)
The a(n) represent the number of n-move routes of a fairy chess piece starting in a given side square (m = 2, 4, 6 or 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a king on the eight side and corner squares but on the central square the king goes crazy and turns into a red king, see A179596.
For the side squares the 512 red kings lead to 47 different red king sequences, see the cross-references for some examples.
The sequence above corresponds to four A[5] vectors with the decimal [binary] values 367 [1,0,1,1,0,1,1,1,1], 463 [1,1,1,0,0,1,1,1,1], 487 [1,1,1,1,0,0,1,1,1] and 493 [1,1,1,1,0,1,1,0,1]. These vectors lead for the corner squares to A179596 and for the central square to A179597.
This sequence belongs to a family of sequences with g.f. (1+x)/(1-4*x-k*x^2). Red king sequences that are members of this family are A003947 (k=0), A015448 (k=1), A123347 (k=2), A126473 (k=3; this sequence) and A086347 (k=4). Other members of this family are A000351 (k=5), A001834 (k=-1), A111567 (k=-2), A048473 (k=-3) and A053220 (k=-4)
Inverse binomial transform of A154244. (End)
Equals the INVERT transform of A055099: (1, 4, 14, 50, 178, ...). - Gary W. Adamson, Aug 14 2010
Number of one-sided n-step walks taking steps from {E, W, N, NE, NW}. - Shanzhen Gao, May 10 2011
For n>=1, a(n) equals the numbers of words of length n-1 on alphabet {0,1,2,3,4} containing no subwords 00 and 11. - Milan Janjic, Jan 31 2015

Crossrefs

Cf. 5 symbol differing by two or less A126392, one or less A057960.
Cf. Red king sequences side squares [numerical value A[5]]: A086347 [495], A179598 [239], A126473 [367], A123347 [335], A179602 [95], A154964 [31], A015448 [327], A152187 [27], A003947 [325], A108981 [11], A007483 [2]. - Johannes W. Meijer, Aug 01 2010
Cf. A055099.

Programs

  • Maple
    with(LinearAlgebra): nmax:=19; m:=2; A[5]:= [1,0,1,1,0,1,1,1,1]: A:=Matrix([[0,1,0,1,1,0,0,0,0],[1,0,1,1,1,1,0,0,0],[0,1,0,0,1,1,0,0,0],[1,1,0,0,1,0,1,1,0],A[5],[0,1,1,0,1,0,0,1,1],[0,0,0,1,1,0,0,1,0],[0,0,0,1,1,1,1,0,1],[0,0,0,0,1,1,0,1,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax); # Johannes W. Meijer, Aug 01 2010
    # second Maple program:
    a:= n-> (M-> M[1,2]+M[2,2])(<<0|1>, <3|4>>^n):
    seq(a(n), n=0..24);  # Alois P. Heinz, Jun 28 2021
  • Mathematica
    LinearRecurrence[{4, 3}, {1, 5}, 24] (* Jean-François Alcover, Dec 10 2024 *)
  • PARI
    a(n)=([0,1; 3,4]^n*[1;5])[1,1] \\ Charles R Greathouse IV, May 10 2016

Formula

From Johannes W. Meijer, Aug 01 2010: (Start)
G.f.: (1+x)/(1-4*x-3*x^2).
a(n) = 4*a(n-1) + 3*a(n-2) with a(0) = 1 and a(1) = 5.
a(n) = ((1+3/sqrt(7))/2)*(A)^(-n) + ((1-3/sqrt(7))/2)*(B)^(-n) with A = (-2 + sqrt(7))/3 and B = (-2-sqrt(7))/3.
Lim_{k->oo} a(n+k)/a(k) = (-1)^(n+1)*A000244(n)/(A015530(n)*sqrt(7)-A108851(n))
(End)
a(n) = A015330(n)+A015330(n+1). - R. J. Mathar, May 09 2023

Extensions

Edited by Johannes W. Meijer, Aug 10 2010

A190958 a(n) = 2*a(n-1) - 10*a(n-2), with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, -6, -32, -4, 312, 664, -1792, -10224, -2528, 97184, 219648, -532544, -3261568, -1197696, 30220288, 72417536, -157367808, -1038910976, -504143872, 9380822016, 23803082752, -46202054656, -330434936832, -198849327104, 2906650714112, 7801794699264
Offset: 0

Views

Author

Keywords

Comments

For the difference equation a(n) = c*a(n-1) - d*a(n-2), with a(0) = 0, a(1) = 1, the solution is a(n) = d^((n-1)/2) * ChebyshevU(n-1, c/(2*sqrt(d))) and has the alternate form a(n) = ( ((c + sqrt(c^2 - 4*d))/2)^n - ((c - sqrt(c^2 - 4*d))/2)^n )/sqrt(c^2 - 4*d). In the case c^2 = 4*d then the solution is a(n) = n*d^((n-1)/2). The generating function is x/(1 - c*x + d^2) and the exponential generating function takes the form (2/sqrt(c^2 - 4*d))*exp(c*x/2)*sinh(sqrt(c^2 - 4*d)*x/2) for c^2 > 4*d, (2/sqrt(4*d - c^2))*exp(c*x/2)*sin(sqrt(4*d - c^2)*x/2) for 4*d > c^2, and x*exp(sqrt(d)*x) if c^2 = 4*d. - G. C. Greubel, Jun 10 2022

Crossrefs

Programs

  • Magma
    I:=[0,1]; [n le 2 select I[n] else 2*Self(n-1)-10*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 17 2011
    
  • Mathematica
    LinearRecurrence[{2,-10}, {0,1}, 50]
  • PARI
    a(n)=([0,1; -10,2]^n*[0;1])[1,1] \\ Charles R Greathouse IV, Apr 08 2016
    
  • SageMath
    [lucas_number1(n,2,10) for n in (0..50)] # G. C. Greubel, Jun 10 2022

Formula

G.f.: x / ( 1 - 2*x + 10*x^2 ). - R. J. Mathar, Jun 01 2011
E.g.f.: (1/3)*exp(x)*sin(3*x). - Franck Maminirina Ramaharo, Nov 13 2018
a(n) = 10^((n-1)/2) * ChebyshevU(n-1, 1/sqrt(10)). - G. C. Greubel, Jun 10 2022
a(n) = (1/3)*10^(n/2)*sin(n*arctan(3)) = Sum_{k=0..floor(n/2)} (-1)^k*3^(2*k)*binomial(n,2*k+1). - Gerry Martens, Oct 15 2022

A367298 Triangular array T(n,k), read by rows: coefficients of strong divisibility sequence of polynomials p(1,x) = 1, p(2,x) = 2 + 4*x, p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where u = p(2,x), v = 1 - 2*x - x^2.

Original entry on oeis.org

1, 2, 4, 5, 14, 15, 12, 48, 76, 56, 29, 148, 326, 372, 209, 70, 436, 1212, 1904, 1718, 780, 169, 1242, 4169, 8228, 10191, 7642, 2911, 408, 3456, 13576, 32176, 49992, 51488, 33112, 10864, 985, 9448, 42492, 117304, 218254, 281976, 249612, 140712, 40545
Offset: 1

Views

Author

Clark Kimberling, Nov 26 2023

Keywords

Comments

Because (p(n,x)) is a strong divisibility sequence, for each integer k, the sequence (p(n,k)) is a strong divisibility sequence of integers.

Examples

			First eight rows:
    1
    2     4
    5    14     15
   12    48     76     56
   29   148    326    372    209
   70   436   1212   1904   1718   780
  169  1242   4169   8228  10191  7642    2911
  408  3456  13576  32176  49992  51488  33112  10864
Row 4 represents the polynomial p(4,x) = 12 + 48*x + 76*x^2 + 56*x^3, so (T(4,k)) = (12,48,76,56), k=0..3.
		

Crossrefs

Cf. A000129 (column 1), A001353 (p(n,n-1)), A154244 (row sums, p(n,1)), A002605 (alternating row sums, p(n,-1)), A190989 (p(n,2)), A005668 (p(n,-2)), A190869 (p(n,-3)), A094440, A367208, A367209, A367210, A367211, A367297, A367299, A367300, A367301.

Programs

  • Mathematica
    p[1, x_] := 1; p[2, x_] := 2 + 4 x; u[x_] := p[2, x]; v[x_] := 1 - 2 x - x^2;
    p[n_, x_] := Expand[u[x]*p[n - 1, x] + v[x]*p[n - 2, x]]
    Grid[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]
    Flatten[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]

Formula

p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where p(1,x) = 1, p(2,x) = 2 + 4*x, u = p(2,x), and v = 1 - 2*x - x^2.
p(n,x) = k*(b^n - c^n), where k = -(1/sqrt(8 + 8*x + 12*x^2)), b = (1/2)*(4*x + 2 + 1/k), c = (1/2)*(4*x + 2 - 1/k).

A367301 Triangular array T(n,k), read by rows: coefficients of strong divisibility sequence of polynomials p(1,x) = 1, p(2,x) = 3 + 3*x, p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where u = p(2,x), v = 1 - 2*x - x^2.

Original entry on oeis.org

1, 3, 3, 10, 16, 8, 33, 75, 63, 21, 109, 320, 380, 220, 55, 360, 1296, 1980, 1620, 720, 144, 1189, 5070, 9459, 9940, 6255, 2262, 377, 3927, 19353, 42615, 54561, 44085, 22635, 6909, 987, 12970, 72532, 184034, 277480, 272854, 179972, 78230, 20672, 2584
Offset: 1

Views

Author

Clark Kimberling, Dec 23 2023

Keywords

Comments

Because (p(n,x)) is a strong divisibility sequence, for each integer k, the sequence (p(n,k)) is a strong divisibility sequence of integers.

Examples

			First eight rows:
     1
     3      3
    10     16      8
    33     75     63     21
   109    320    380    220     55
   360   1296   1980   1620    720    144
  1189   5070   9459   9940   6255   2262   377
  3927  19353  42615  54561  44085  22635  6909  987
Row 4 represents the polynomial p(4,x) = 33 + 75*x + 63*x^2 + 21*x^3, so (T(4,k)) = (33,75,63,21), k=0..3.
		

Crossrefs

Cf. A006190 (column 1); A001906 (p(n,n-1)); A154244 (row sums, p(n,1)); A077957 (alternating row sums, p(n,-1)); A190984 (p(n,2)); A006190 (signed, p(n,-2)); A154244 (p(n,-3)); A190984 (p(n,-4)); A094440, A367208, A367209, A367210, A367211, A367297, A367298, A367299, A367300.

Programs

  • Mathematica
    p[1, x_] := 1; p[2, x_] := 3 + 3 x; u[x_] := p[2, x]; v[x_] := 1 - 2 x - x^2;
    p[n_, x_] := Expand[u[x]*p[n - 1, x] + v[x]*p[n - 2, x]]
    Grid[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]
    Flatten[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]

Formula

p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where p(1,x) = 1, p(2,x) = 3 + 3*x, u = p(2,x), and v = 1 - 2*x - x^2.
p(n,x) = k*(b^n - c^n), where k = -(1/sqrt(13 + 10*x + 5*x^2)), b = (1/2) (3*x + 3 + 1/k), c = (1/2) (3*x + 3 - 1/k).

A090018 a(n) = 6*a(n-1) + 3*a(n-2) for n > 2, a(0)=1, a(1)=6.

Original entry on oeis.org

1, 6, 39, 252, 1629, 10530, 68067, 439992, 2844153, 18384894, 118841823, 768205620, 4965759189, 32099171994, 207492309531, 1341251373168, 8669985167601, 56043665125110, 362271946253463, 2341762672896108, 15137391876137037, 97849639275510546, 632510011281474387
Offset: 0

Views

Author

Paul Barry, Nov 19 2003

Keywords

Comments

From Johannes W. Meijer, Aug 09 2010: (Start)
a(n) represents the number of n-move routes of a fairy chess piece starting in a given corner or side square on a 3 X 3 chessboard. This fairy chess piece behaves like a white queen on the eight side and corner squares but on the central square the queen explodes with fury and turns into a red queen, see A180032. The central square leads to A180028. (End)

Crossrefs

Sequences with g.f. of the form 1/(1 - 6*x - k*x^2): A106392 (k=-10), A027471 (k=-9), A006516 (k=-8), A081179 (k=-7), A030192 (k=-6), A003463 (k=-5), A084326 (k=-4), A138395 (k=-3), A154244 (k=-2), A001109 (k=-1), A000400 (k=0), A005668 (k=1), A135030 (k=2), this sequence (k=3), A135032 (k=4), A015551 (k=5), A057089 (k=6), A015552 (k=7), A189800 (k=8), A189801 (k=9), A190005 (k=10), A015553 (k=11).

Programs

  • Magma
    [n le 2 select 6^(n-1) else 6*Self(n-1)+3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
    
  • Maple
    a:= n-> (<<0|1>, <3|6>>^n. <<1,6>>)[1,1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 17 2011
  • Mathematica
    Join[{a=1,b=6},Table[c=6*b+3*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 16 2011 *)
    LinearRecurrence[{6,3}, {1,6}, 41] (* G. C. Greubel, Oct 10 2022 *)
  • PARI
    my(x='x+O('x^30)); Vec(1/(1-6*x-3*x^2)) \\ G. C. Greubel, Jan 24 2018
  • Sage
    [lucas_number1(n,6,-3) for n in range(1, 31)] # Zerinvary Lajos, Apr 24 2009
    

Formula

a(n) = (3+2*sqrt(3))^n*(sqrt(3)/4+1/2) + (1/2-sqrt(3)/4)*(3-2*sqrt(3))^n.
a(n) = (-i*sqrt(3))^n * ChebyshevU(n, isqrt(3)), i^2=-1.
From Johannes W. Meijer, Aug 09 2010: (Start)
G.f.: 1/(1 - 6*x - 3*x^2).
Limit_{k->oo} a(n+k)/a(k) = A141041(n) + A090018(n-1)*sqrt(12) for n >= 1.
Limit_{n->oo} A141041(n)/A090018(n-1) = sqrt(12). (End)
a(n) = Sum_{k=0..n} A099089(n,k)*3^k. - Philippe Deléham, Nov 21 2011
E.g.f.: exp(3*x)*(2*cosh(2*sqrt(3)*x) + sqrt(3)*sinh(2*sqrt(3)*x))/2. - Stefano Spezia, Apr 23 2025

Extensions

Typo in Mathematica program corrected by Vincenzo Librandi, Nov 15 2011

A180032 Eight white queens and one red queen on a 3 X 3 chessboard. G.f.: (1+x)/(1-5*x-7*x^2).

Original entry on oeis.org

1, 6, 37, 227, 1394, 8559, 52553, 322678, 1981261, 12165051, 74694082, 458625767, 2815987409, 17290317414, 106163498933, 651849716563, 4002393075346, 24574913392671, 150891318490777, 926480986202582, 5688644160448349
Offset: 0

Views

Author

Johannes W. Meijer, Aug 09 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in a given corner or side square (m = 1, 3, 7, 9; 2, 4, 6, 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a white chess queen on the eight side and corner squares but on the central square the queen explodes with fury and turns into a red queen.
On a 3 X 3 chessboard there are 2^9 = 512 ways to explode with fury on the central square (we assume here that a red queen might behave like a white queen). The red queen is represented by the A[5] vector in the fifth row of the adjacency matrix A, see the Maple program. For the corner and side squares the 512 red queens lead to 17 red queen sequences, see the cross-references for the complete set.
The sequence above corresponds to 8 red queen vectors, i.e., A[5] vectors, with decimal values 239, 367, 431, 463, 487, 491, 493 and 494. The central square leads for these vectors to A152240.
This sequence belongs to a family of sequences with g.f. (1+x)/(1 - 5*x - k*x^2). The members of this family that are red queen sequences are A180030 (k=8), A180032 (k=7; this sequence), A000400 (k=6), A180033 (k=5), A126501 (k=4), A180035 (k=3), A180037 (k=2) A015449 (k=1) and A003948 (k=0). Other members of this family are A030221 (k=-1), A109114 (k=-3), A020989 (k=-4), A166060 (k=-6).
Inverse binomial transform of A054413.

Crossrefs

Cf. A180028 (Central square).
Cf. Red queen sequences corner and side squares [decimal value A[5]]: A090018 [511], A135030 [255], A180030 [495], A005668 [127], A180032 [239], A000400 [63], A180033 [47], A001109 [31], A126501 [15], A154244 [23], A180035 [7], A138395 [19], A180037 [3], A084326 [17], A015449 [1], A003463 [16], A003948 [0].

Programs

  • Magma
    I:=[1,6]; [n le 2 select I[n] else 5*Self(n-1)+7*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
  • Maple
    with(LinearAlgebra): nmax:=20; m:=1; A[5]:= [1,1,1,1,0,1,1,1,0]: A:=Matrix([[0,1,1,1,1,0,1,0,1], [1,0,1,1,1,1,0,1,0], [1,1,0,0,1,1,1,0,1], [1,1,0,0,1,1,1,1,0], A[5], [0,1,1,1,1,0,0,1,1], [1,0,1,1,1,0,0,1,1], [0,1,0,1,1,1,1,0,1], [1,0,1,0,1,1,1,1,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
  • Mathematica
    LinearRecurrence[{5,7},{1,6},40] (* Vincenzo Librandi, Nov 15 2011 *)
    CoefficientList[Series[(1+x)/(1-5x-7x^2),{x,0,30}],x] (* Harvey P. Dale, Apr 04 2024 *)

Formula

G.f.: (1+x)/(1 - 5*x - 7*x^2).
a(n) = 5*a(n-1) + 7*a(n-2) with a(0) = 1 and a(1) = 6.
a(n) = ((7+9*A)*A^(-n-1) + (7+9*B)*B^(-n-1))/53 with A = (-5+sqrt(53))/14 and B = (-5-sqrt(53))/14.

A110441 Triangular array formed by the Mersenne numbers.

Original entry on oeis.org

1, 3, 1, 7, 6, 1, 15, 23, 9, 1, 31, 72, 48, 12, 1, 63, 201, 198, 82, 15, 1, 127, 522, 699, 420, 125, 18, 1, 255, 1291, 2223, 1795, 765, 177, 21, 1, 511, 3084, 6562, 6768, 3840, 1260, 238, 24, 1, 1023, 7181, 18324, 23276, 16758, 7266, 1932, 308, 27, 1
Offset: 0

Views

Author

Asamoah Nkwanta (nkwanta(AT)jewel.morgan.edu), Aug 08 2005

Keywords

Comments

This sequence factors A038255 into a product of Riordan arrays.
Subtriangle of the triangle given by (0, 3, -2/3, 2/3, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 19 2012
From Peter Bala, Jul 22 2014: (Start)
Let M denote the lower unit triangular array A130330 and for k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/
having the k x k identity matrix I_k as the upper left block; in particular, M(0) = M. Then the present triangle equals the infinite matrix product M(0)*M(1)*M(2)*... (which is clearly well-defined). See the Example section. (End)
For 1<=k<=n, T(n,k) equals the number of (n-1)-length ternary words containing k-1 letters equal 2 and avoiding 01 and 02. - Milan Janjic, Dec 20 2016
The convolution triangle of the Mersenne numbers. - Peter Luschny, Oct 09 2022

Examples

			Triangle starts:
   1;
   3,  1;
   7,  6,  1;
  15, 23,  9,  1;
  31, 72, 48, 12,  1;
(0, 3, -2/3, 2/3, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, ...) begins:
  1
  0,  1
  0,  3,  1
  0,  7,  6,  1
  0, 15, 23,  9,  1
  0, 31, 72, 48, 12, 1. - _Philippe Deléham_, Mar 19 2012
With the arrays M(k) as defined in the Comments section, the infinite product M(0*)M(1)*M(2)*... begins
/ 1          \/1         \/1        \      / 1       \
| 3  1       ||0  1      ||0 1      |      | 3  1    |
| 7  3 1     ||0  3 1    ||0 0 1    |... = | 7  6 1  |
|15  7 3 1   ||0  7 3 1  ||0 0 3 1  |      |15 23 9 1|
|31 15 7 3 1 ||0 15 7 3 1||0 0 7 3 1|      |...      |
|...         ||...       ||...      |      |...      | - _Peter Bala_, Jul 22 2014
		

Crossrefs

Programs

  • Maple
    # Uses function PMatrix from A357368. Adds column 1, 0, 0, ... to the left.
    PMatrix(10, n -> 2^n - 1); # Peter Luschny, Oct 09 2022
  • Mathematica
    With[{n = 9}, DeleteCases[#, 0] & /@ CoefficientList[Series[1/(1 - (3 + y) x + 2 x^2), {x, 0, n}, {y, 0, n}], {x, y}]] // Flatten (* Michael De Vlieger, Apr 25 2018 *)

Formula

Riordan array M(n, k): (1/(1-3z+2z^2), z/(1-3z+2z^2)). Leftmost column M(n, 0) is the Mersenne numbers A000225, first column is A045618, second column is A055582, row sum is A007070 and diagonal sum is even-indexed Fibonacci numbers A001906.
T(n,k) = Sum_{j=0..n} C(j+k,k)C(n-j,k)2^(n-j-k). - Paul Barry, Feb 13 2006
From Philippe Deléham, Mar 19 2012: (Start)
G.f.: 1/(1-(3+y)*x+2*x^2).
T(n,k) = 3*T(n-1,k) + T(n-1,k-1) -2*T(n-2,k), T(0,0) = 1, T(n,k) = 0 if k<0 or if k>n.
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000225(n+1), A007070(n), A107839(n), A154244(n), A186446(n), A190975(n+1), A190979(n+1), A190869(n+1) for x = 0, 1, 2, 3, 4, 5, 6, 7 respectively. (End)
Recurrence: T(n+1,k+1) = Sum_{i=0..n-k} (2^(i+1) - 1)*T(n-i,k). - Peter Bala, Jul 22 2014
From Peter Bala, Oct 07 2019: (Start)
Recurrence for row polynomials: R(n,x) = (3 + x)*R(n-1,x) - 2*R(n-2,x) with R(0,x) = 1 and R(1,x) = 3 + x.
The row reverse polynomial x^n*R(n,1/x) is equal to the numerator polynomial of the finite continued fraction 1 + x/(1 + 2*x/(1 + ... + x/(1 + 2*x/(1)))) (with 2*n partial numerators). Cf. A116414. (End)

A146963 a(n) = ((3 + sqrt(7))^n + (3 - sqrt(7))^n)/2.

Original entry on oeis.org

1, 3, 16, 90, 508, 2868, 16192, 91416, 516112, 2913840, 16450816, 92877216, 524361664, 2960415552, 16713769984, 94361788800, 532743192832, 3007735579392, 16980927090688, 95870091385344, 541258694130688
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Nov 03 2008

Keywords

Comments

Binomial transform of A108851.
Inverse binomial transform of A146964.

Crossrefs

Programs

  • GAP
    a:=[1,3];; for n in [3..25] do a[n]:=6*a[n-1]-2*a[n-2]; od; a; # G. C. Greubel, Jan 08 2020
  • Magma
    Z:= PolynomialRing(Integers()); N:=NumberField(x^2-7); S:=[ ((3+r7)^n+(3-r7)^n)/2: n in [0..25] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Nov 05 2008
    
  • Maple
    seq(coeff(series((1-3*x)/(1-6*x+2*x^2), x, n+1), x, n), n = 0..25); # G. C. Greubel, Jan 08 2020
  • Mathematica
    Transpose[NestList[Join[{Last[#],6Last[#]-2First[#]}]&,{1,3},25]] [[1]]  (* or *) CoefficientList[Series[(1-3x)/(1-6x+2x^2),{x,0,25}],x]  (* Harvey P. Dale, Apr 11 2011 *)
    LinearRecurrence[{6,-2}, {1,3}, 25] (* G. C. Greubel, Jan 08 2020 *)
  • PARI
    my(x='x+O('x^25)); Vec((1-3*x)/(1-6*x+2*x^2)) \\ G. C. Greubel, Jan 08 2020
    
  • Sage
    def A146963_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-3*x)/(1-6*x+2*x^2) ).list()
    A146963_list(25) # G. C. Greubel, Jan 08 2020
    

Formula

From Philippe Deléham and Klaus Brockhaus, Nov 05 2008: (Start)
a(n) = 6*a(n-1) - 2*a(n-2) with a(0)=1, a(1)=3.
G.f.: (1-3*x)/(1-6*x+2*x^2). (End)
a(n) = (Sum_{k=0..n} A098158(n,k)*3^(2*k)*7^(n-k))/3^n. - Philippe Deléham, Nov 06 2008
E.g.f.: exp(3*x)*cosh(sqrt(7)*x). - G. C. Greubel, Jan 08 2020
a(n) = A154244(n)-3*A154244(n-1). - R. J. Mathar, Jan 25 2023

Extensions

Extended beyond a(7) by Klaus Brockhaus, Nov 05 2008
Edited by Klaus Brockhaus, Jul 16 2009

A180034 Eight white queens and one red queen on a 3 X 3 chessboard. G.f.: (1 - 2*x)/(1 - 6*x + 2*x^2).

Original entry on oeis.org

1, 4, 22, 124, 700, 3952, 22312, 125968, 711184, 4015168, 22668640, 127981504, 722551744, 4079347456, 23030981248, 130027192576, 734101192960, 4144552772608, 23399114249728, 132105579953152, 745835251219456
Offset: 0

Views

Author

Johannes W. Meijer, Aug 09 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in the central square (m = 5) on a 3 X 3 chessboard. This fairy chess piece behaves like a white queen on the eight side and corner squares but on the central square the queen explodes with fury and turns into a red queen, see A180028.
The sequence above corresponds to 56 red queen vectors, i.e., A[5] vector, with decimal values varying between 23 and 464. The corner and side squares lead for these vectors to A154244.

Crossrefs

Programs

  • Magma
    I:=[1,4]; [n le 2 select I[n] else 6*Self(n-1)-2*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
  • Maple
    with(LinearAlgebra): nmax:=21; m:=5; A[5]:= [0,0,0,0,1,0,1,1,1]: A:=Matrix([[0,1,1,1,1,0,1,0,1], [1,0,1,1,1,1,0,1,0], [1,1,0,0,1,1,1,0,1], [1,1,0,0,1,1,1,1,0], A[5], [0,1,1,1,1,0,0,1,1], [1,0,1,1,1,0,0,1,1], [0,1,0,1,1,1,1,0,1], [1,0,1,0,1,1,1,1,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
  • Mathematica
    LinearRecurrence[{6,-2},{1,4},50] (* Vincenzo Librandi, Nov 15 2011 *)

Formula

G.f.: (1-2*x)/(1 - 6*x + 2*x^2).
a(n) = 6*a(n-1) - 2*a(n-2) with a(0) = 1 and a(1) = 4.
a(n) = ((1+4*A)*A^(-n-1) + (1+4*B)*B^(-n-1))/14 with A = (3+sqrt(7))/2 and B = (3-sqrt(7))/2.
a(n) = A154244(n) - 2*A154244(n-1). - R. J. Mathar, Aug 14 2012

A191897 Coefficients of the Z(n,x) polynomials; Z(0,x) = 1, Z(1,x) = x and Z(n,x) = x*Z(n-1,x) - 2*Z(n-2,x), n >= 2.

Original entry on oeis.org

1, 1, 0, 1, 0, -2, 1, 0, -4, 0, 1, 0, -6, 0, 4, 1, 0, -8, 0, 12, 0, 1, 0, -10, 0, 24, 0, -8, 1, 0, -12, 0, 40, 0, -32, 0, 1, 0, -14, 0, 60, 0, -80, 0, 16, 1, 0, -16, 0, 84, 0, -160, 0, 80, 0, 1, 0, -18, 0, 112, 0, -280, 0, 240, 0, -32
Offset: 0

Views

Author

Paul Curtz, Jun 19 2011

Keywords

Comments

The coefficients of the Z(n,x) polynomials by decreasing exponents, see the formulas, define this triangle.

Examples

			The first few rows of the coefficients of the Z(n,x) are
  1;
  1,    0;
  1,    0,   -2;
  1,    0,   -4,    0;
  1,    0,   -6,    0,    4;
  1,    0,   -8,    0,   12,    0;
  1,    0,  -10,    0,   24,    0,   -8;
  1,    0,  -12,    0,   40,    0,  -32,    0;
  1,    0,  -14,    0,   60,    0,  -80,    0,   16;
  1,    0,  -16,    0,   84,    0, -160,    0,   80,    0;
		

Crossrefs

Row sums: A107920(n+1). Main diagonal: A077966(n).
Z(n,x=1) = A107920(n+1), Z(n,x=2) = A009545(n+1),
Z(n,x=3) = A000225(n+1), Z(n,x=4) = A007070(n),
Z(n,x=5) = A107839(n), Z(n,x=6) = A154244(n),
Z(n,x=7) = A186446(n), Z(n,x=8) = A190975(n+1),
Z(n,x=9) = A190979(n+1), Z(n,x=10) = A190869(n+1).
Row sum without sign: A113405(n+1).

Programs

  • Maple
    nmax:=10: Z(0, x):=1 : Z(1, x):=x: for n from 2 to nmax do Z(n, x) := x*Z(n-1, x) - 2*Z(n-2, x) od: for n from 0 to nmax do for k from 0 to n do T(n, k) := coeff(Z(n, x), x, n-k) od: od: seq(seq(T(n, k), k=0..n), n=0..nmax); # Johannes W. Meijer, Jun 27 2011, revised Nov 29 2012
  • Mathematica
    a[n_, k_] := If[OddQ[k], 0, 2^(k/2)*Coefficient[ ChebyshevU[n, x/2], x, n-k]]; Flatten[ Table[ a[n, k], {n, 0, 10}, {k, 0, n}]] (* Jean-François Alcover, Aug 02 2012, from 2nd formula *)

Formula

Z(0,x) = 1, Z(1,x) = x and Z(n,x) = x*Z(n-1,x) - 2*Z(n-2,x), n >= 2.
a(n,k) = A077957(k) * A053119(n,k). - Paul Curtz, Sep 30 2011

Extensions

Edited and information added by Johannes W. Meijer, Jun 27 2011
Showing 1-10 of 10 results.