Displaying 1-10 of 23 results found.
Number of strings over a 5 symbol alphabet with adjacent symbols differing by three or less.
+10
58
1, 5, 23, 107, 497, 2309, 10727, 49835, 231521, 1075589, 4996919, 23214443, 107848529, 501037445, 2327695367, 10813893803, 50238661313, 233396326661, 1084301290583, 5037394142315, 23402480441009, 108722104190981, 505095858086951, 2346549744920747
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.
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.
Inverse binomial transform of A154244.
(End)
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
FORMULA
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.
(End)
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):
PROG
(S/R) stvar $[N]:(0..M-1) init $[]:=0 asgn $[]->{*} kill +[i in 0..N-2](($[i]`-$[i+1]`>3)+($[i+1]`-$[i]`>3))
CROSSREFS
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
Scaled Chebyshev U-polynomials evaluated at i*sqrt(5)/2. Generalized Fibonacci sequence.
+10
29
1, 5, 30, 175, 1025, 6000, 35125, 205625, 1203750, 7046875, 41253125, 241500000, 1413765625, 8276328125, 48450468750, 283633984375, 1660422265625, 9720281250000, 56903517578125, 333118994140625, 1950112558593750, 11416157763671875, 66831351611328125, 391237546875000000
COMMENTS
a(n) gives the length of the word obtained after n steps with the substitution rule 0->11111, 1->111110, starting from 0. The number of 1's and 0's of this word is 5*a(n-1) and 5*a(n-2), resp.
a(n) / a(n-1) converges to (5 + (3 * sqrt(5))) / 2 as n approaches infinity. (5 + (3 * sqrt(5))) / 2 can also be written as phi^2 + (2 * phi), phi^3 + phi, phi + sqrt(5) + 2, (3 * phi) + 1, (3 * phi^2) - 2, phi^4 - 1 and (5 + (3 * (L(n) / F(n)))) / 2, where L(n) is the n-th Lucas number and F(n) is the n-th Fibonacci number as n approaches infinity. - Ross La Haye, Aug 18 2003, on another version
Pisano period lengths: 1, 3, 3, 6, 1, 3, 24, 12, 9, 3, 10, 6, 56, 24, 3, 24,288, 9, 18, 6, ... - R. J. Mathar, Aug 10 2012
FORMULA
a(n) = 5*(a(n-1) + a(n-2)), a(-1)=0, a(0)=1.
a(n) = S(n, i*sqrt(5))*(-i*sqrt(5))^n with S(n, x) := U(n, x/2), Chebyshev's polynomials of the 2nd kind, A049310.
G.f.: 1/(1 - 5*x - 5*x^2).
a(n) = (1/3)*Sum_{k=0..n} binomial(n, k)*Fibonacci(k)*3^k. - Benoit Cloitre, Oct 25 2003
a(n) = ((5 + 3*sqrt(5))/2)^n(1/2 + sqrt(5)/6) + (1/2 - sqrt(5)/6)((5 - 3*sqrt(5))/2)^n. - Paul Barry, Sep 22 2004
(a(n)) appears to be given by the floretion - 0.75'i - 0.5'j + 'k - 0.75i' + 0.5j' + 0.5k' + 1.75'ii' - 1.25'jj' + 1.75'kk' - 'ij' - 0.5'ji' - 0.75'jk' - 0.75'kj' - 1.25e ("jes"). - Creighton Dement, Nov 28 2004
G.f.: G(0)/(2-5*x), where G(k)= 1 + 1/(1 - x*(9*k-5)/(x*(9*k+4) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 17 2013
a(2*n-1) = 5^n*F(4*n)/3 = (5^(n-1/2)*L(4*n) - 2*5^(n-1/2)*beta^(4*n))/3.
a(2*n) = 5^n*L(4*n+2)/3 = (5^(n+1/2)*F(4*n+2) + 2*5^n*beta^(4*n+2))/3.
a(n) = round 5^((n+1)/2)*F(2*(n+1))/3.
a(n) = round 5^(n/2)*L(2*(n+1))/3. (End)
MAPLE
a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=5*a[n-1]+5*a[n-2]od: seq(a[n], n=1..33); # Zerinvary Lajos, Dec 14 2008
MATHEMATICA
LinearRecurrence[{5, 5}, {1, 5}, 30] (* G. C. Greubel, Jan 16 2018 *)
PROG
(Sage) [lucas_number1(n, 5, -5) for n in range(1, 22)] # Zerinvary Lajos, Apr 24 2009
(PARI) x='x+O('x^30); Vec(1/(1 - 5*x - 5*x^2)) \\ G. C. Greubel, Jan 16 2018
(Magma) I:=[1, 5]; [n le 2 select I[n] else 5*Self(n-1) + 5*Self(n-2): n in [0..30]]; // G. C. Greubel, Jan 16 2018
CROSSREFS
Cf. A001076, A006190, A007482, A015520, A015521, A015523, A015524, A015525, A015528, A015529, A015530, A015531, A015532, A015533, A015534, A015535, A015536, A015537, A015443, A015447, A030195, A053404, A057087, A083858, A085939, A090017, A091914, A099012, A180222, A180226.
Eight white kings and one red king on a 3 X 3 chessboard. G.f.: (1 + x)/(1 - 2*x - 11*x^2 - 6*x^3).
+10
22
1, 3, 17, 73, 351, 1607, 7513, 34809, 161903, 751783, 3493353, 16227737, 75393055, 350251335, 1627192697, 7559508409, 35119644495, 163157037671, 757987215241, 3521419711833, 16359641017343, 76002822156295, 353090213774361
COMMENTS
The a(n) represent the number of n-move routes of a fairy chess piece starting in a given corner square (m = 1, 3, 7 or 9) on a 3 X 3 chessboard. This fairy chess piece behaves like a king on the eight side and corner squares but on the center square the king goes crazy and turns into a red king.
On a 3 X 3 chessboard there are 2^9 = 512 ways to go crazy on the center square (off the center the piece behaves like a normal king). The red king is represented by the A[5] vector in the fifth row of the adjacency matrix A, see the Maple program and A180140. For the corner squares the 512 red kings lead to 47 different red king sequences, see the overview of the red king sequences.
The sequence above corresponds to four A[5] vectors with decimal [binary] values 367 [101 101 111], 463 [111 001 111], 487 [111 100 111] and 493 [111 101 101]. These vectors lead for the side squares to A126473 and for the central square to A179597.
This sequence belongs to a family of sequences with g.f. (1+x)/(1 - 2*x - (k+8)*x^2 - 2*k*x^3). Red king sequences that are members of this family are A083424 (k=0), A179604 (k=1), A179600 (k=2), A179596 (k=3; this sequence) and A086346 (k=4). Other members of this family are A015528 (k=5) and A179608 (k=-4).
REFERENCES
Gary Chartrand, Introductory Graph Theory, pp. 217-221, 1984.
FORMULA
G.f.: (1+x)/(1 - 2*x - 11*x^2 - 6*x^3).
a(n) = 2*a(n-1) + 11*a(n-2) + 6*a(n-3) with a(0)=1, a(1)=3 and a(2)=17.
a(n) = (-1)^(-n)*2^(n+1)/9 + ((49+17*sqrt(7))*A^(-n) + (49-17*sqrt(7))*B^(-n))/126 with A = (-2+sqrt(7))/3 and B = (-2-sqrt(7))/3.
MAPLE
nmax:=22; m:=1; A[1]:= [0, 1, 0, 1, 1, 0, 0, 0, 0]: A[2]:= [1, 0, 1, 1, 1, 1, 0, 0, 0]: A[3]:= [0, 1, 0, 0, 1, 1, 0, 0, 0]: A[4]:=[1, 1, 0, 0, 1, 0, 1, 1, 0]: A[5]:= [1, 0, 1, 1, 0, 1, 1, 1, 1]: A[6]:= [0, 1, 1, 0, 1, 0, 0, 1, 1]: A[7]:= [0, 0, 0, 1, 1, 0, 0, 1, 0]: A[8]:= [0, 0, 0, 1, 1, 1, 1, 0, 1]: A[9]:= [0, 0, 0, 0, 1, 1, 0, 1, 0]: A:=Matrix([A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[8], A[9]]): 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[{2, 11, 6}, {1, 3, 17}, 30] (* Harvey P. Dale, May 18 2011 *)
CROSSREFS
Cf. Red king sequences corner squares [decimal value A[5]]: A086346 [495], A015525 [239], A179596 [367], A179600 [335], A015524 [95], A083858 [31], A179604 [327], A015523 [27], A179610 [85], A083424 [325], A015521 [11], A007482 [2], A014335 [16].
Power ceiling-floor sequence of (golden ratio)^4.
+10
20
7, 47, 323, 2213, 15169, 103969, 712615, 4884335, 33477731, 229459781, 1572740737, 10779725377, 73885336903, 506417632943, 3471038093699, 23790849022949, 163064905066945, 1117663486445665, 7660579500052711
COMMENTS
Let f = floor and c = ceiling. For x > 1, define four sequences as functions of x, as follows:
p1(0) = f(x), p1(n) = f(x*p1(n-1));
p2(0) = f(x), p2(n) = c(x*p2(n-1)) if n is odd and p2(n) = f(x*p1(n-1)) if n is even;
p3(0) = c(x), p3(n) = f(x*p3(n-1)) if n is odd and p3(n) = c(x*p3(n-1)) if n is even;
p4(0) = c(x), p4(n) = c(x*p4(n-1)).
The present sequence is given by a(n) = p3(n).
Following the terminology at A214986, call the four sequences power floor, power floor-ceiling, power ceiling-floor, and power ceiling sequences. In the table below, a sequence is identified with an A-numbered sequence if they appear to agree except possibly for initial terms. Notation: S(t)=sqrt(t), r = (1+S(5))/2 = golden ratio, and Limit = limit of p3(n)/p2(n).
x ......p1..... p2..... p3..... p4.......Limit
...
Properties of p1, p2, p3, p4:
(1) If x > 2, the terms of p2 and p3 interlace: p2(0) < p3(0) < p2(1) < p3(1) < p2(2) < p3(2)... Also, p1(n) <= p2(n) <= p3(n) <= p4(n) <= p1(n+1) for all x>0 and n>=0.
(2) If x > 2, the limits L(x) = limit(p/x^n) exist for the four functions p(x), and L1(x) <= L2(x) <= L3(x) <= L4 (x). See the Mathematica programs for plots of the four functions; one of them also occurs in the Odlyzko and Wilf article, along with a discussion of the special case x = 3/2.
(3) Suppose that x = u + sqrt(v) where v is a nonsquare positive integer. If u = f(x) or u = c(x), then p1, p2, p3, p4 are linear recurrence sequences. Is this true for sequences p1, p2, p3, p4 obtained from x = (u + sqrt(v))^q for every positive integer q?
(4) Suppose that x is a Pisot-Vijayaraghavan number. Must p1, p2, p3, p4 then be linearly recurrent? If x is also a quadratic irrational b + c*sqrt(d), must the four limits L(x) be in the field Q(sqrt(d))?
(5) The Odlyzko and Wilf article (page 239) raises three interesting questions about the power ceiling function; it appears that they remain open.
FORMULA
a(n) = floor(r*a(n-1)) if n is odd and a(n) = ceiling(r*a(n-1)) if n is even, where a(0) = ceiling(r), r = (golden ratio)^4 = (7 + sqrt(5))/2.
a(n) = 6*a(n-1) + 6*a(n-2) - a(n-3).
G.f.: (7 + 5*x - x^2)/((1 + x)*(1 - 7*x + x^2)).
a(n) = (10*(-2)^n+(10+3*sqrt(5))*(7-3*sqrt(5))^(n+2)+(10-3*sqrt(5))*(7+3*sqrt(5))^(n+2))/(90*2^n). - Bruno Berselli, Nov 14 2012
EXAMPLE
a(0) = ceiling(r) = 7, where r = ((1+sqrt(5))/2)^4 = 6.8...; a(1) = floor(7*r) = 47; a(2) = ceiling(47) = 323.
MATHEMATICA
(* Program 1. A214992 and related sequences *)
x = GoldenRatio^4; z = 30; (* z = # terms in sequences *)
z1 = 100; (* z1 = # digits in approximations *)
f[x_] := Floor[x]; c[x_] := Ceiling[x];
p1[0] = f[x]; p2[0] = f[x]; p3[0] = c[x]; p4[0] = c[x];
p1[n_] := f[x*p1[n - 1]]
p2[n_] := If[Mod[n, 2] == 1, c[x*p2[n - 1]], f[x*p2[n - 1]]]
p3[n_] := If[Mod[n, 2] == 1, f[x*p3[n - 1]], c[x*p3[n - 1]]]
p4[n_] := c[x*p4[n - 1]]
Table[p1[n], {n, 0, z}] (* A049685 *)
Table[p2[n], {n, 0, z}] (* A157335 *)
Table[p3[n], {n, 0, z}] (* A214992 *)
Table[p4[n], {n, 0, z}] (* A004187 *)
Table[p4[n] - p1[n], {n, 0, z}] (* A004187 *)
Table[p3[n] - p2[n], {n, 0, z}] (* A098305 *)
(* Program 2. Plot of power floor and power ceiling functions, p1(x) and p4(x) *)
f[x_] := f[x] = Floor[x]; c[x_] := c[x] = Ceiling[x];
p1[x_, 0] := f[x]; p1[x_, n_] := f[x*p1[x, n - 1]];
p4[x_, 0] := c[x]; p4[x_, n_] := c[x*p4[x, n - 1]];
Plot[Evaluate[{p1[x, 10]/x^10, p4[x, 10]/x^10}], {x, 2, 3}, PlotRange -> {0, 4}]
(* Program 3. Plot of power floor-ceiling and power ceiling-floor functions, p2(x) and p3(x) *)
f[x_] := f[x] = Floor[x]; c[x_] := c[x] = Ceiling[x];
p2[x_, 0] := f[x]; p3[x_, 0] := c[x];
p2[x_, n_] := If[Mod[n, 2] == 1, c[x*p2[x, n - 1]], f[x*p2[x, n - 1]]]
p3[x_, n_] := If[Mod[n, 2] == 1, f[x*p3[x, n - 1]], c[x*p3[x, n - 1]]]
Plot[Evaluate[{p2[x, 10]/x^10, p3[x, 10]/x^10}], {x, 2, 3}, PlotRange -> {0, 4}]
Scaled Chebyshev U-polynomials evaluated at i*sqrt(6)/2. Generalized Fibonacci sequence.
+10
15
1, 6, 42, 288, 1980, 13608, 93528, 642816, 4418064, 30365280, 208700064, 1434392064, 9858552768, 67757668992, 465697330560, 3200729997312, 21998563967232, 151195763787264, 1039165966526976, 7142170381885440
COMMENTS
a(n) gives the length of the word obtained after n steps with the substitution rule 0->1^6, 1->(1^6)0, starting from 0. The number of 1's and 0's of this word is 6*a(n-1) and 6*a(n-2), resp.
FORMULA
a(n) = 6*a(n-1) + 6*a(n-2); a(0)=1, a(1)=6.
a(n) = S(n, i*sqrt(6))*(-i*sqrt(6))^n with S(n, x) := U(n, x/2), Chebyshev's polynomials of the 2nd kind, A049310.
G.f.: 1/(1-6*x-6*x^2).
MATHEMATICA
LinearRecurrence[{6, 6}, {1, 6}, 40] (* Harvey P. Dale, Nov 05 2011 *)
PROG
(Sage) [lucas_number1(n, 6, -6) for n in range(1, 21)] # Zerinvary Lajos, Apr 24 2009
(Magma) I:=[1, 6]; [n le 2 select I[n] else 6*Self(n-1)+6*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 14 2011
(PARI) x='x+O('x^30); Vec(1/(1-6*x-6*x^2)) \\ G. C. Greubel, Jan 24 2018
CROSSREFS
Cf. A001076, A006190, A007482, A015520, A015521, A015523, A015524, A015525, A015528, A015529, A015530, A015531, A015532, A015533, A015534, A015535, A015536, A015537, A015440, A015441, A015443, A015444, A015445, A015447, A015548, A030195, A053404, A057087, A057088, A083858, A085939, A090017, A091914, A099012, A135030, A135032, A180222, A180226, A180250.
Expansion of x/(1 - 5*x - 4*x^2).
+10
14
0, 1, 5, 29, 165, 941, 5365, 30589, 174405, 994381, 5669525, 32325149, 184303845, 1050819821, 5991314485, 34159851709, 194764516485, 1110461989261, 6331368012245, 36098688018269, 205818912140325, 1173489312774701, 6690722212434805
COMMENTS
First differences give A122690(n) = {1, 4, 24, 136, 776, 4424, 25224, ...}. Partial sums of a(n) are {0, 1, 6, 35, 200, ...} = ( A123270(n) - 1)/8. - Alexander Adamchuk, Nov 03 2006
For n >= 2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 5's along the main diagonal, and 2's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 19 2011
Pisano period lengths: 1, 1, 8, 1, 4, 8, 48, 1, 24, 4, 40, 8, 42, 48, 8, 2, 72, 24, 360, 4, ... - R. J. Mathar, Aug 10 2012
FORMULA
a(n) = 5*a(n-1) + 4*a(n-2).
a(n) = Sum_{k=0..floor((n-1)/2)} C(n-k-1, k)*4^k*5^(n-2*k-1). - Paul Barry, Apr 23 2005
a(n) = 2^(n-1)*Fibonacci(n, 5/2) = (2/i)^(n-1)*ChebyshevU(n-1, 5*i/4). - G. C. Greubel, Dec 26 2019
MAPLE
seq( simplify((2/I)^(n-1)*ChebyshevU(n-1, 5*I/4)), n=0..20); # G. C. Greubel, Dec 26 2019
MATHEMATICA
Table[2^(n-1)*Fibonacci[n, 5/2], {n, 0, 30}] (* G. C. Greubel, Dec 26 2019 *)
PROG
(Sage) [lucas_number1(n, 5, -4) for n in range(0, 22)] # Zerinvary Lajos, Apr 24 2009
(Magma) [n le 2 select n-1 else 5*Self(n-1)+4*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 12 2012
(PARI) x='x+O('x^30); concat([0], Vec(x/(1-5*x-4*x^2))) \\ G. C. Greubel, Jan 01 2018
(GAP) a:=[0, 1];; for n in [3..30] do a[n]:=5*a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, Dec 26 2019
CROSSREFS
Cf. A001076, A006190, A007482, A015520, A015521, A015523, A015524, A015525, A015528, A015529, A015530, A015531, A015532, A015533, A015534, A015535, A015536, A015443, A015447, A030195, A053404, A057087, A083858, A085939, A090017, A091914, A099012, A122690, A123270, A180222, A180226.
Eight white kings and one red king on a 3 X 3 chessboard. G.f.: (1 + 5*x + 2*x^2)/(1 - 2*x - 11*x^2 - 6*x^3).
+10
14
1, 7, 27, 137, 613, 2895, 13355, 62233, 288741, 1342175, 6233899, 28964169, 134554277, 625117807, 2904117675, 13491856889, 62679715045, 291194561919, 1352817130667, 6284852732713, 29197861274277, 135646005392399
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 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 central square 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 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 side squares to A126473.
This sequence belongs to a family of sequences with g.f. (1 + (k+2)*x + (2*k-4)*x^2)/(1 - 2*x - (k+8)*x^2 - (2*k)*x^3). Red king sequences that are members of this family are A179607 (k=0), A179605 (k=1), A179601 (k=2), A179597 (k=3; this sequence) and A086348 (k=4). Another member of this family is A179609 (k = -4).
FORMULA
G.f.: (1 + 5*x + 2*x^2)/(1 - 2*x - 11*x^2 - 6*x^3).
a(n) = 2*a(n-1) + 11*a(n-2) + 6*a(n-3) with a(0) = 1, a(1) = 7 and a(2) = 27.
a(n) = 8*(-1/2)^(-n+1)/9 + ((7+11*sqrt(7))*A^(-n-1) + (7-11*sqrt(7))*B^(-n-1))/126 with A = (-2+sqrt(7))/3 and B = (-2-sqrt(7))/3.
MAPLE
with(LinearAlgebra): nmax:=21; m:=5; A[1]:= [0, 1, 0, 1, 1, 0, 0, 0, 0]: A[2]:= [1, 0, 1, 1, 1, 1, 0, 0, 0]: A[3]:= [0, 1, 0, 0, 1, 1, 0, 0, 0]: A[4]:=[1, 1, 0, 0, 1, 0, 1, 1, 0]: A[5]:= [1, 0, 1, 1, 0, 1, 1, 1, 1]: A[6]:= [0, 1, 1, 0, 1, 0, 0, 1, 1]: A[7]:= [0, 0, 0, 1, 1, 0, 0, 1, 0]: A[8]:= [0, 0, 0, 1, 1, 1, 1, 0, 1]: A[9]:= [0, 0, 0, 0, 1, 1, 0, 1, 0]: A:=Matrix([A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[8], A[9]]): 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[{2, 11, 6}, {1, 7, 27}, 30] (* Harvey P. Dale, Mar 01 2015 *)
CROSSREFS
Red king sequences central square [numerical value A[5]]: A086348 [495], A179599 [239], A179597 [367], A179601 [335], A179603 [95], A154964 [31], A179605 [327], A179606 [27], A179611 [15], A179607 [325], A015521 [11], A007483 [2], A000012 [16], A000007 [0].
a(n) = 4*a(n-1) + 10*a(n-2), with a(1)=0 and a(2)=1.
+10
11
0, 1, 4, 26, 144, 836, 4784, 27496, 157824, 906256, 5203264, 29875616, 171535104, 984896576, 5654937344, 32468715136, 186424233984, 1070384087296, 6145778689024, 35286955629056, 202605609406464, 1163291993916416, 6679224069730304, 38349816218085376
FORMULA
a(n) = ((2+sqrt(14))^(n-1) - (2-sqrt(14))^(n-1))/(2*sqrt(14)). - Rolf Pleisch, May 14 2011
G.f.: x^2/(1-4*x-10*x^2).
MATHEMATICA
Join[{a=0, b=1}, Table[c=4*b+10*a; a=b; b=c, {n, 100}]]
LinearRecurrence[{4, 10}, {0, 1}, 30] (* G. C. Greubel, Jan 16 2018 *)
PROG
(PARI) x='x+O('x^30); concat([0], Vec(x^2/(1-4*x-10*x^2))) \\ G. C. Greubel, Jan 16 2018
(Magma) I:=[0, 1]; [n le 2 select I[n] else 4*Self(n-1) + 10*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 16 2018
CROSSREFS
Cf. A001076, A006190, A007482, A015520, A015521, A015523, A015524, A015525, A015528, A015529, A015530, A015531, A015532, A015533, A015534, A015443, A015447, A030195, A053404, A057087, A083858, A085939, A090017, A091914, A099012, A180222.
Generalized Fibonacci numbers: a(n) = 6*a(n-1) + 2*a(n-2).
+10
9
0, 1, 6, 38, 240, 1516, 9576, 60488, 382080, 2413456, 15244896, 96296288, 608267520, 3842197696, 24269721216, 153302722688, 968355778560, 6116740116736, 38637152257536, 244056393778688, 1541612667187200
COMMENTS
For n>0, a(n) equals the number of words of length n-1 over {0,1,...,7} in which 0 and 1 avoid runs of odd lengths. - Milan Janjic, Jan 08 2017
FORMULA
a(0) = 0; a(1) = 1; a(n) = 2*(3*a(n-1) + a(n-2)).
a(n) = 1/(2*sqrt(11))*( (3 + sqrt(11))^n - (3 - sqrt(11))^n ).
E.g.f.: (1/sqrt(11))*exp(3*x)*sinh(sqrt(11)*x). - G. C. Greubel, Sep 17 2016
MAPLE
A:= gfun:-rectoproc({a(0) = 0, a(1) = 1, a(n) = 2*(3*a(n-1) + a(n-2))}, a(n), remember):
MATHEMATICA
LinearRecurrence[{6, 2}, {0, 1}, 30] (* or *) CoefficientList[Series[ -(x/(2x^2+6x-1)), {x, 0, 30}], x] (* Harvey P. Dale, Jun 20 2011 *)
PROG
(Sage) [lucas_number1(n, 6, -2) for n in range(0, 21)] # Zerinvary Lajos, Apr 24 2009
(Magma) [n le 2 select n-1 else 6*Self(n-1) + 2*Self(n-2): n in [1..35]]; // Vincenzo Librandi, Sep 18 2016
CROSSREFS
Cf. A001076, A006190, A007482, A015520, A015521, A015523, A015524, A015525, A015528, A015529, A015530, A015531, A015532, A015533, A015534, A015535, A015536, A015537, A015440, A015441, A015443, A015444, A015445, A015447, A015548, A030195, A053404, A057087, A057088, A083858, A085939, A090017, A091914, A099012, A180222, A180226, A180250.
a(n) = 4*a(n-1) + 3*a(n-2), a(0) = 1, a(1) = 2.
+10
8
1, 2, 11, 50, 233, 1082, 5027, 23354, 108497, 504050, 2341691, 10878914, 50540729, 234799658, 1090820819, 5067682250, 23543191457, 109375812578, 508132824683, 2360658736466, 10967033419913, 50950109889050
COMMENTS
Binomial transform of A083098, second binomial transform of (1, 0, 7, 0, 49, 0, 243, 0, ...).
FORMULA
a(n) = ((2 + sqrt(7))^n + (2 - sqrt(7))^n) / 2.
G.f.: (1 - 2*x) / (1 - 4*x - 3*x^2).
E.g.f.: exp(2*x)*cosh(sqrt(7)*x).
a(n+1)/a(n) converges to 2 + sqrt(7) = 4.645751311064...
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(7*k-4)/(x*(7*k+3) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 27 2013
MATHEMATICA
LinearRecurrence[{4, 3}, {1, 2}, 30] (* Harvey P. Dale, Jan 02 2022 *)
PROG
(Sage) [lucas_number2(n, 4, -3)/2 for n in range(0, 22)] # Zerinvary Lajos, May 14 2009
(Magma) [Floor(((2 + Sqrt(7))^n + (2 - Sqrt(7))^n) / 2): n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
Search completed in 0.016 seconds
|