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-4 of 4 results.

A175654 Eight bishops and one elephant on a 3 X 3 chessboard. G.f.: (1 - x - x^2)/(1 - 3*x - x^2 + 6*x^3).

Original entry on oeis.org

1, 2, 6, 14, 36, 86, 210, 500, 1194, 2822, 6660, 15638, 36642, 85604, 199626, 464630, 1079892, 2506550, 5811762, 13462484, 31159914, 72071654, 166599972, 384912086, 888906306, 2052031172, 4735527306, 10925175254, 25198866036, 58108609526, 133973643090
Offset: 0

Views

Author

Johannes W. Meijer, Aug 06 2010; edited Jun 21 2013

Keywords

Comments

a(n) represents 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 bishop on the eight side and corner squares but on the center square the bishop flies into a rage and turns into a raging elephant.
In chaturanga, the old Indian version of chess, one of the pieces was called gaja, elephant in Sanskrit. The Arabs called the game shatranj and the elephant became el fil in Arabic. In Spain chess became chess as we know it today but surprisingly in Spanish a bishop isn't a Christian bishop but a Moorish elephant and it still goes by its original name of el alfil.
On a 3 X 3 chessboard there are 2^9 = 512 ways for an elephant to fly into a rage on the central square (off the center the piece behaves like a normal bishop). The elephant 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 elephants lead to 46 different elephant sequences, see the overview of elephant sequences and the crossreferences.
The sequence above corresponds to 16 A[5] vectors with decimal values 71, 77, 101, 197, 263, 269, 293, 323, 326, 329, 332, 353, 356, 389, 449 and 452. These vectors lead for the side squares to A000079 and for the central square to A175655.

References

  • Gary Chartrand, Introductory Graph Theory, pp. 217-221, 1984.
  • David Hooper and Kenneth Whyld, The Oxford Companion to Chess, pp. 74, 366, 1992.

Crossrefs

Cf. Elephant sequences corner squares [decimal value A[5]]: A040000 [0], A000027 [16], A000045 [1], A094373 [2], A000079 [3], A083329 [42], A027934 [11], A172481 [7], A006138 [69], A000325 [26], A045623 [19], A000129 [21], A095121 [170], A074878 [43], A059570 [15], A175654 [71, this sequence], A026597 [325], A097813 [58], A057711 [27], 2*A094723 [23; n>=-1], A002605 [85], A175660 [171], A123203 [186], A066373 [59], A015518 [341], A134401 [187], A093833 [343].

Programs

  • Magma
    [n le 3 select Factorial(n) else 3*Self(n-1) +Self(n-2) -6*Self(n-3): n in [1..41]]; // G. C. Greubel, Dec 08 2021
    
  • Maple
    nmax:=28; m:=1; A[1]:=[0,0,0,0,1,0,0,0,1]: A[2]:=[0,0,0,1,0,1,0,0,0]: A[3]:=[0,0,0,0,1,0,1,0,0]: A[4]:=[0,1,0,0,0,0,0,1,0]: A[5]:=[0,0,1,0,0,0,1,1,1]: A[6]:=[0,1,0,0,0,0,0,1,0]: A[7]:=[0,0,1,0,1,0,0,0,0]: A[8]:=[0,0,0,1,0,1,0,0,0]: A[9]:=[1,0,0,0,1,0,0,0,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[{3,1,-6}, {1,2,6}, 80] (* Vladimir Joseph Stephan Orlovsky, Feb 21 2012 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -6,1,3]^n*[1;2;6])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
    
  • Sage
    [( (1-x-x^2)/((1-2*x)*(1-x-3*x^2)) ).series(x,n+1).list()[n] for n in (0..40)] # G. C. Greubel, Dec 08 2021

Formula

G.f.: (1 - x - x^2)/(1 - 3*x - x^2 + 6*x^3).
a(n) = 3*a(n-1) + a(n-2) - 6*a(n-3) with a(0)=1, a(1)=2 and a(2)=6.
a(n) = ((6+10*A)*A^(-n-1) + (6+10*B)*B^(-n-1))/13 - 2^n with A = (-1+sqrt(13))/6 and B = (-1-sqrt(13))/6.
Limit_{k->oo} a(n+k)/a(k) = (-1)^(n)*2*A000244(n)/(A075118(n) - A006130(n-1)*sqrt(13)).
a(n) = b(n) - b(n-1) - b(n-2), where b(n) = Sum_{k=1..n} Sum_{j=0..k} binomial(j,n-3*k+2*j)*(-6)^(k-j)*binomial(k,j)*3^(3*k-n-j), n>0, b(0)=1, with a(0) = b(0), a(1) = b(1) - b(0). - Vladimir Kruchinin, Aug 20 2010
a(n) = 2*A006138(n) - 2^n = 2*(A006130(n) + A006130(n-1)) - 2^n. - G. C. Greubel, Dec 08 2021
E.g.f.: 2*exp(x/2)*(13*cosh(sqrt(13)*x/2) + 3*sqrt(13)*sinh(sqrt(13)*x/2))/13 - cosh(2*x) - sinh(2*x). - Stefano Spezia, Feb 12 2023

A175655 Eight bishops and one elephant on a 3 X 3 chessboard. G.f.: (1+x-5*x^2)/(1-3*x-x^2+6*x^3).

Original entry on oeis.org

1, 4, 8, 22, 50, 124, 290, 694, 1628, 3838, 8978, 21004, 48962, 114022, 265004, 615262, 1426658, 3305212, 7650722, 17697430, 40911740, 94528318, 218312114, 503994220, 1163124866, 2683496134, 6189647948, 14273690782
Offset: 0

Views

Author

Johannes W. Meijer, Aug 06 2010, Aug 10 2010

Keywords

Comments

a(n) represents 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 bishop on the eight side and corner squares but on the central square the bishop turns into a raging elephant, see A175654.
For the central square the 512 elephants lead to 46 different elephant sequences, see the cross-references for examples.
The sequence above corresponds to 16 A[5] vectors with decimal values 71, 77, 101, 197, 263, 269, 293, 323, 326, 329, 332, 353, 356, 389, 449 and 452. These vectors lead for the side squares to A000079 and for the corner squares to A175654.

Crossrefs

Cf. Elephant sequences central square [decimal value A[5]]: A000007 [0], A000012 [16], A000045 [1], A011782 [2], A000079 [3], A003945 [42], A099036 [11], A175656 [7], A105476 [69], A168604 [26], A045891 [19], A078057 [21], A151821 [170], A175657 [43], 4*A172481 [15; n>=-1], A175655 [71, this sequence], 4*A026597 [325; n>=-1], A033484 [58], A087447 [27], A175658 [23], A026150 [85], A175661 [171], A036563 [186], A098156 [59], A046717 [341], 2*A001792 [187; n>=1 with a(0)=1], A175659 [343].

Programs

  • Magma
    I:=[1, 4, 8]; [n le 3 select I[n] else 3*Self(n-1)+Self(n-2)-6*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jul 21 2013
    
  • Maple
    with(LinearAlgebra): nmax:=27; m:=5; A[5]:= [0,0,1,0,0,0,1,1,1]: A:=Matrix([[0,0,0,0,1,0,0,0,1], [0,0,0,1,0,1,0,0,0], [0,0,0,0,1,0,1,0,0], [0,1,0,0,0,0,0,1,0], A[5], [0,1,0,0,0,0,0,1,0], [0,0,1,0,1,0,0,0,0], [0,0,0,1,0,1,0,0,0], [1,0,0,0,1,0,0,0,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
    CoefficientList[Series[(1 + x - 5 x^2) / (1 - 3 x - x^2 + 6 x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 21 2013 *)
    LinearRecurrence[{3,1,-6},{1,4,8},40] (* Harvey P. Dale, Dec 25 2024 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -6,1,3]^n*[1;4;8])[1,1] \\ Charles R Greathouse IV, Oct 03 2016

Formula

G.f.: (1+x-5*x^2)/(1-3*x-x^2+6*x^3).
a(n) = 3*a(n-1) + a(n-2) - 6*a(n-3) with a(0)=1, a(1)=4 and a(2)=8.
a(n) = ((10+8*A)*A^(-n-1) + (10+8*B)*B^(-n-1))/13 - 2^n with A = (-1+sqrt(13))/6 and B = (-1-sqrt(13))/6.
Limit_{k->oo} a(n+k)/a(k) = (-1)^(n)*2*A000244(n)/(A075118(n)-A006130(n-1)*sqrt(13)).
E.g.f.: 2*exp(x/2)*(13*cosh(sqrt(13)*x/2) + 5*sqrt(13)*sinh(sqrt(13)*x/2))/13 - cosh(2*x) - sinh(2*x). - Stefano Spezia, Jan 31 2023

A075117 Table by antidiagonals of generalized Lucas numbers: T(n,k) = T(n,k-1) + n*T(n,k-2) with T(n,0)=2 and T(n,1)=1.

Original entry on oeis.org

2, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 4, 5, 1, 2, 1, 7, 7, 7, 1, 2, 1, 11, 17, 10, 9, 1, 2, 1, 18, 31, 31, 13, 11, 1, 2, 1, 29, 65, 61, 49, 16, 13, 1, 2, 1, 47, 127, 154, 101, 71, 19, 15, 1, 2, 1, 76, 257, 337, 297, 151, 97, 22, 17, 1, 2, 1, 123, 511, 799, 701, 506, 211, 127, 25, 19, 1, 2
Offset: 0

Views

Author

Henry Bottomley, Sep 02 2002

Keywords

Examples

			Array starts as:
  2, 1,  1,  1,  1,   1, ...;
  2, 1,  3,  4,  7,  11, ...;
  2, 1,  5,  7, 17,  31, ...;
  2, 1,  7, 10, 31,  61, ...;
  2, 1,  9, 13, 49, 101, ...;
  2, 1, 11, 16, 71, 151, ...; etc.
		

Crossrefs

Cf. A060959.
Columns include: A007395, A000012, A005408, A016777, A056220, A062786.

Programs

  • Magma
    [2^(1+k-n)*(&+[Binomial(n-k,2*j)*(1+4*k)^j: j in [0..Floor((n-k)/2)]]): k in [0..n], n in [0..13]]; // G. C. Greubel, Jan 27 2020
    
  • Maple
    seq(seq( 2^(1+k-n)*add( binomial(n-k, 2*j)*(1+4*k)^j, j=0..floor((n-k)/2)), k=0..n), n=0..13); # G. C. Greubel, Jan 27 2020
  • Mathematica
    T[n_, k_]:= ((1 + Sqrt[1+4n])/2)^k + ((1 - Sqrt[1+4n])/2)^k; Table[If[n==0 && k==0, 2, T[k, n-k]]//Simplify, {n,0,13}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 27 2020 *)
  • Sage
    def T(n, k): return 2^(1-k)*sum( binomial(k, 2*j)*(1+4*n)^j for j in (0..floor(k/2)) )
    [[T(k,n-k) for k in (0..n)] for n in (0..13)] # G. C. Greubel, Jan 27 2020

Formula

T(n, k) = ((1+sqrt(4*n+1))/2)^k + ((1-sqrt(4*n+1))/2)^k = 2*A060959(n, k+1) - A060959(n, k).
T(n, k) = 2^(1-k)*Sum_{j=0..floor(k/2)} binomial(k, 2*j)*(1+4*n)^j. - G. C. Greubel, Jan 27 2020

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

Original entry on oeis.org

1, 6, 9, 27, 54, 135, 297, 702, 1593, 3699, 8478, 19575, 45009, 103734, 238761, 549963, 1266246, 2916135, 6714873, 15463278, 35607897, 81997731, 188821422, 434814615, 1001278881, 2305722726, 5309559369, 12226727547, 28155405654, 64835588295, 149301805257, 343808570142
Offset: 0

Views

Author

Bruno Berselli, Sep 13 2016

Keywords

Comments

a(n)/a(n+1) converges to 1/A209927 as n approaches infinity.

Examples

			Table of similar sequences (not extendable on the left side) where this recurrence can be applied to the first two terms:
----------------------------------------------------------------------
(*)      -  -  1, -1,  2, -1,  5,   2,  17,  23,   74,  143,  365, ...
A052533: -  -  1,  0,  3,  3, 12,  21,  57, 120,  291,  651, 1524, ...
(^)      -  0, 1,  1,  4,  7, 19,  40,  97, 217,  508, 1159, 2683, ...
A006138: -  -  1,  2,  5, 11, 26,  59, 137, 314,  725, 1667, 3842, ...
A105476: -  -  1,  3,  6, 15, 33,  78, 177, 411,  942, 2175, 5001, ...
(^)      0, 1, 1,  4,  7, 19, 40,  97, 217, 508, 1159, 2683, 6160, ...
A105963: -  -  1,  5,  8, 23, 47, 116, 257, 605, 1376, 3191, 7319, ...
A274977: -  -  1,  6,  9, 27, 54, 135, 297, 702, 1593, 3699, 8478, ...
A075118: -  2, 1,  7, 10, 31, 61, 154, 337, 799, 1810, 4207, 9637, ...
----------------------------------------------------------------------
(*) see version A140165.
(^) see A006130 and the signed versions A140167, A182228.
		

Crossrefs

Programs

  • GAP
    a:=[1,6];; for n in [3..40] do a[n]:=a[n-1]+3*a[n-2]; od; a; # G. C. Greubel, Jan 15 2020
  • Magma
    [n le 2 select 5*n-4 else Self(n-1)+3*Self(n-2): n in [1..40]];
    
  • Magma
    R:=PowerSeriesRing(Integers(), 32); Coefficients(R!((1 + 5*x)/(1- x-3*x^2))); // Marius A. Burtea, Jan 15 2020
    
  • Maple
    seq(coeff(series((1+5*x)/(1-x-3*x^2), x, n+1), x, n), n = 0..40); # G. C. Greubel, Jan 15 2020
  • Mathematica
    RecurrenceTable[{a[n]==a[n-1] +3a[n-2], a[0]==1, a[1]==6}, a, {n,0,40}]
    Table[Round[Sqrt[3]^(n-1)*(Sqrt[3]*Fibonacci[n+1, 1/Sqrt[3]] + 5*Fibonacci[n, 1/Sqrt[3]])], {n,0,40}] (* G. C. Greubel, Jan 15 2020 *)
    LinearRecurrence[{1,3},{1,6},40] (* Harvey P. Dale, Jul 11 2023 *)
  • PARI
    v=vector(40); v[1]=1; v[2]=6; for(n=3, #v, v[n]=v[n-1]+3*v[n-2]); v
    
  • Sage
    from sage.combinat.sloane_functions import recur_gen2
    a = recur_gen2(1, 6, 1, 3)
    [next(a) for n in range(40)]
    

Formula

G.f.: (1 + 5*x)/(1 - x - 3*x^2).
a(n) = ((13 + 11*sqrt(13))*(1 + sqrt(13))^n + (13 - 11*sqrt(13))*(1 - sqrt(13))^n)/(26*2^n).
3*a(n) + a(n+1) = 9*A105476(n+1).
3*a(n) - a(n+1) = 27*A006130(n-3) with n>1, A006130(-1) = 0.
a(n+1) - a(n) = 27*A105476(n-3) with n>2.
a(n) = 3^((n-1)/2)*( sqrt(3)*Fibonacci(n+1, 1/sqrt(3)) + 5*Fibonacci(n, 1/sqrt(3)) ). - G. C. Greubel, Jan 15 2020
E.g.f.: (1/13)*exp(x/2)*(13*cosh((sqrt(13)*x)/2) + 11*sqrt(13)*sinh((sqrt(13)*x)/2)). - Stefano Spezia, Jan 15 2020
Showing 1-4 of 4 results.