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

A179600 Eight white kings and one red king on a 3 X 3 chessboard. G.f.: (1 + x)/(1 - 2*x - 10*x^2 - 4*x^3).

Original entry on oeis.org

1, 3, 16, 66, 304, 1332, 5968, 26472, 117952, 524496, 2334400, 10385568, 46213120, 205619520, 914912512, 4070872704, 18113348608, 80595074304, 358607125504, 1595618388480, 7099688329216, 31589989045248, 140559334936576
Offset: 0

Views

Author

Johannes W. Meijer, Jul 28 2010

Keywords

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 central square the king goes crazy and turns into a red king, see A179596.
The sequence above corresponds to 6 red king vectors, i.e., A[5] vectors, with decimal values 335, 359, 365, 455, 461 and 485. These vectors lead for the side squares to A123347 and for the central square to A179601.

Programs

  • Maple
    with(LinearAlgebra): nmax:=24; 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,1,1,0,0,0,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);
  • PARI
    Vec((1+x)/(1 - 2*x - 10*x^2 - 4*x^3) + O(x^40)) \\ Jinyuan Wang, Mar 10 2020

Formula

G.f.: (1+x)/(1 - 2*x - 10*x^2 - 4*x^3).
a(n) = 2*a(n-1) + 10*a(n-2) + 4*a(n-3) with a(0)=1, a(1)=3 and a(2)=16.
a(n) = (4*(-1/2)^(-n) + (1+sqrt(6))*A^(-n-1) + (1-sqrt(6))*B^(-n-1))/20 with A = (-1+sqrt(6)/2) and B = (-1-sqrt(6)/2).
Lim_{k->infinity} a(n+k)/a(k) = (-1)^(n+1)*(A016116(n+1)/(A041007(n-1)*sqrt(6) - A041006(n-1))) for n => 1.

A179601 Eight white kings and one red king on a 3 X 3 chessboard. G.f.: (1+4*x)/(1 - 2*x - 10*x^2 - 4*x^3).

Original entry on oeis.org

1, 6, 22, 108, 460, 2088, 9208, 41136, 182704, 813600, 3618784, 16104384, 71651008, 318820992, 1418569600, 6311953152, 28084886272, 124963582464, 556023840256, 2474023050240, 11008138832896, 48980603529216, 217938687588352
Offset: 0

Views

Author

Johannes W. Meijer, Jul 28 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 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.
The sequence above corresponds to 6 red king vectors, i.e., A[5] vectors, with decimal values 335, 359, 365, 455, 461 and 485. These vectors lead for the corner squares to A179600 and for the side squares to A123347.

Crossrefs

Cf. A041006, A041007, A123347, A179596, A179597 (central square), A179600.

Programs

  • Maple
    with(LinearAlgebra): nmax:=22; 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,1,1,0,0,0,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);

Formula

G.f.: ( -1-4*x ) / ( (2*x+1)*(2*x^2 + 4*x - 1) ).
a(n) = 2*a(n-1) + 10*a(n-2) + 4*a(n-3) with a(0)=1, a(1)=6 and a(2)=22.
a(n) = (-2/5)*(-1/2)^(-n) + ((2+3*A)*A^(-n-1) + (2+3*B)*B^(-n-1))/10 with A = (-1+sqrt(6)/2) and B = (-1-sqrt(6)/2).
Limit_{k->oo} a(n+k)/a(k) = (-1)^(n+1)*A016116(n+1)/(A041007(n-1)*sqrt(6) - A041006(n-1)) for n => 1.

A259594 Denominators of the other-side convergents to sqrt(6).

Original entry on oeis.org

1, 3, 11, 29, 109, 287, 1079, 2841, 10681, 28123, 105731, 278389, 1046629, 2755767, 10360559, 27279281, 102558961, 270037043, 1015229051, 2673091149, 10049731549, 26460874447, 99482086439, 261935653321, 984771132841, 2592895658763, 9748229241971
Offset: 0

Views

Author

Clark Kimberling, Jul 20 2015

Keywords

Comments

Suppose that a positive irrational number r has continued fraction [a(0), a(1), ... ]. Define sequences p(i), q(i), P(i), Q(i) from the numerators and denominators of finite continued fractions as follows: p(i)/q(i) = [a(0), a(1), ... a(i)] and P(i)/Q(i) = [a(0), a(1), ..., a(i) + 1]. The fractions p(i)/q(i) are the convergents to r, and the fractions P(i)/Q(i) are introduced here as the "other-side convergents" to r, because p(2k)/q(2k) < r < P(2k)/Q(2k) and P(2k+1)/Q(2k+1) < r < p(2k+1)/q(2k+1), for k >= 0. Closeness of P(i)/Q(i) to r is indicated by
|r - P(i)/Q(i)| < |p(i)/q(i) - P(i)/Q(i)| = 1/(q(i)Q(i)), for i >= 0.

Examples

			For r = sqrt(6), the first 7 other-side convergents are 3, 7/3, 27/11, 71/29, 267/109, 703/287, 2643/1079. A comparison of convergents with other-side convergents:
i    p(i)/q(i)           P(i)/Q(i)    p(i)*Q(i)-P(i)*q(i)
0    2/1     < sqrt(6) <    3/1               -1
1    5/2     > sqrt(6) >    7/3                1
2    22/9    < sqrt(6) <   27/11              -1
3    49/20   > sqrt(6) >   71/29               1
4    218/89  < sqrt(6) <  267/109             -1
5    485/198 > sqrt(6) >  703/287              1
		

Crossrefs

Programs

  • Mathematica
    r = Sqrt[6]; a[i_] := Take[ContinuedFraction[r, 35], i];
    b[i_] := ReplacePart[a[i], i -> Last[a[i]] + 1];
    t = Table[FromContinuedFraction[b[i]], {i, 1, 35}]
    u = Denominator[t]  (*A259594*)
    v = Numerator[t]    (*A259595*)
  • PARI
    Vec(-(x+1)*(x^2-2*x-1)/(x^4-10*x^2+1) + O(x^50)) \\ Colin Barker, Jul 21 2015

Formula

p(i)*Q(i) - P(i)*q(i) = (-1)^(i+1), for i >= 0, where a(i) = Q(i).
a(n) = 10*a(n-2) - a(n-4) for n>3. - Colin Barker, Jul 21 2015
G.f.: -(x+1)*(x^2-2*x-1) / (x^4-10*x^2+1). - Colin Barker, Jul 21 2015

A259595 Numerators of the other-side convergents to sqrt(6).

Original entry on oeis.org

3, 7, 27, 71, 267, 703, 2643, 6959, 26163, 68887, 258987, 681911, 2563707, 6750223, 25378083, 66820319, 251217123, 661452967, 2486793147, 6547709351, 24616714347, 64815640543, 243680350323, 641608696079, 2412186788883, 6351271320247, 23878187538507
Offset: 0

Views

Author

Clark Kimberling, Jul 20 2015

Keywords

Comments

Suppose that a positive irrational number r has continued fraction [a(0), a(1), ... ]. Define sequences p(i), q(i), P(i), Q(i) from the numerators and denominators of finite continued fractions as follows:
p(i)/q(i) = [a(0), a(1), ... a(i)] and P(i)/Q(i) = [a(0), a(1), ..., a(i) + 1]. The fractions p(i)/q(i) are the convergents to r, and the fractions P(i)/Q(i) are introduced here as the "other-side convergents" to r, because p(2k)/q(2k) < r < P(2k)/Q(2k) and P(2k+1)/Q(2k+1) < r < p(2k+1)/q(2k+1), for k >= 0. Closeness of P(i)/Q(i) to r is indicated by
|r - P(i)/Q(i)| < |p(i)/q(i) - P(i)/Q(i)| = 1/(q(i)Q(i)), for i >= 0.

Examples

			For r = sqrt(6), the first 7 other-side convergents are 3, 7/3, 27/11, 71/29, 267/109, 703/287, 2643/1079. A comparison of convergents with other-side convergents:
i    p(i)/q(i)           P(i)/Q(i)    p(i)*Q(i)-P(i)*q(i)
0    2/1     < sqrt(6) <    3/1               -1
1    5/2     > sqrt(6) >    7/3                1
2    22/9    < sqrt(6) <   27/11              -1
3    49/20   > sqrt(6) >   71/29               1
4    218/89  < sqrt(6) <  267/109             -1
5    485/198 > sqrt(6) >  703/287              1
		

Crossrefs

Programs

  • Mathematica
    r = Sqrt[6]; a[i_] := Take[ContinuedFraction[r, 35], i];
    b[i_] := ReplacePart[a[i], i -> Last[a[i]] + 1];
    t = Table[FromContinuedFraction[b[i]], {i, 1, 35}]
    u = Denominator[t]  (* A259594 *)
    v = Numerator[t]    (* A259595 *)
    LinearRecurrence[{0,10,0,-1},{3,7,27,71},30] (* Harvey P. Dale, Mar 21 2023 *)
  • PARI
    Vec((x^3-3*x^2+7*x+3)/(x^4-10*x^2+1) + O(x^50)) \\ Colin Barker, Jul 21 2015

Formula

p(i)*Q(i) - P(i)*q(i) = (-1)^(i+1), for i >= 0, where a(i) = P(i).
a(n) = 10*a(n-2) - a(n-4) for n>3. - Colin Barker, Jul 21 2015
G.f.: (x^3-3*x^2+7*x+3) / (x^4-10*x^2+1). - Colin Barker, Jul 21 2015
Previous Showing 11-14 of 14 results.