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

A002530 a(n) = 4*a(n-2) - a(n-4) for n > 1, a(n) = n for n = 0, 1.

Original entry on oeis.org

0, 1, 1, 3, 4, 11, 15, 41, 56, 153, 209, 571, 780, 2131, 2911, 7953, 10864, 29681, 40545, 110771, 151316, 413403, 564719, 1542841, 2107560, 5757961, 7865521, 21489003, 29354524, 80198051, 109552575, 299303201, 408855776, 1117014753, 1525870529, 4168755811
Offset: 0

Views

Author

Keywords

Comments

Denominators of continued fraction convergents to sqrt(3), for n >= 1.
Also denominators of continued fraction convergents to sqrt(3) - 1. See A048788 for numerators. - N. J. A. Sloane, Dec 17 2007. Convergents are 1, 2/3, 3/4, 8/11, 11/15, 30/41, 41/56, 112/153, ...
Consider the mapping f(a/b) = (a + 3*b)/(a + b). Taking a = b = 1 to start with and carrying out this mapping repeatedly on each new (reduced) rational number gives the following sequence 1/1, 2/1, 5/3, 7/4, 19/11, ... converging to 3^(1/2). Sequence contains the denominators. The same mapping for N, i.e., f(a/b) = (a + Nb)/(a + b) gives fractions converging to N^(1/2). - Amarnath Murthy, Mar 22 2003
Sqrt(3) = 2/2 + 2/3 + 2/(3*11) + 2/(11*41) + 2/(41*153) + 2/(153*571), ...; the sum of the first 6 terms of this series = 1.7320490367..., while sqrt(3) = 1.7320508075... - Gary W. Adamson, Dec 15 2007
From Clark Kimberling, Aug 27 2008: (Start)
Related convergents (numerator/denominator):
lower principal convergents: A001834/A001835
upper principal convergents: A001075/A001353
intermediate convergents: A005320/A001075
principal and intermediate convergents: A143642/A140827
lower principal and intermediate convergents: A143643/A005246. (End)
Row sums of triangle A152063 = (1, 3, 4, 11, ...). - Gary W. Adamson, Nov 26 2008
From Alois P. Heinz, Apr 13 2011: (Start)
Also number of domino tilings of the 3 X (n-1) rectangle with upper left corner removed iff n is even. For n=4 the 4 domino tilings of the 3 X 3 rectangle with upper left corner removed are:
. ._. . ._. . ._. . ._.
.|__| .|__| .| | | .|___|
| |_| | | | | | ||| |_| |
||__| |||_| ||__| |_|_| (End)
This is the sequence of Lehmer numbers u_n(sqrt(R),Q) with the parameters R = 2 and Q = -1. It is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for all natural numbers n and m. - Peter Bala, Apr 18 2014
2^(-floor(n/2))*(1 + sqrt(3))^n = A002531(n) + a(n)*sqrt(3); integers in the real quadratic number field Q(sqrt(3)). - Wolfdieter Lang, Feb 11 2018
Let T(n) = 2^(n mod 2), U(n) = a(n), V(n) = A002531(n), x(n) = V(n)/U(n). Then T(n*m) * U(n+m) = U(n)*V(m) + U(m)*V(n), T(n*m) * V(n+m) = 3*U(n)*U(m) + V(m)*V(n), x(n+m) = (3 + x(n)*x(m))/(x(n) + x(m)). - Michael Somos, Nov 29 2022

Examples

			Convergents to sqrt(3) are: 1, 2, 5/3, 7/4, 19/11, 26/15, 71/41, 97/56, 265/153, 362/209, 989/571, 1351/780, 3691/2131, ... = A002531/A002530 for n >= 1.
1 + 1/(1 + 1/(2 + 1/(1 + 1/2))) = 19/11 so a(5) = 11.
G.f. = x + x^2 + 3*x^3 + 4*x^4 + 11*x^5 + 15*x^6 + 41*x^7 + ... - _Michael Somos_, Mar 18 2022
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • Russell Lyons, A bird's-eye view of uniform spanning trees and forests, in Microsurveys in Discrete Probability, AMS, 1998.
  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 181.
  • Murat Sahin and Elif Tan, Conditional (strong) divisibility sequences, Fib. Q., 56 (No. 1, 2018), 18-31.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. Tarn, Approximations to certain square roots and the series of numbers connected therewith, Mathematical Questions and Solutions from the Educational Times, 1 (1916), 8-12.

Crossrefs

Cf. A002531 (numerators of convergents to sqrt(3)), A048788, A003297.
Bisections: A001353 and A001835.
Cf. A152063.
Analog for sqrt(m): A000129 (m=2), A001076 (m=5), A041007 (m=6), A041009 (m=7), A041011 (m=8), A005668 (m=10), A041015 (m=11), A041017 (m=12), ..., A042935 (m=999), A042937 (m=1000).

Programs

  • Magma
    I:=[0,1,1,3]; [n le 4 select I[n] else 4*Self(n-2) - Self(n-4): n in [1..50]]; // G. C. Greubel, Feb 25 2019
    
  • Maple
    a := proc(n) option remember; if n=0 then 0 elif n=1 then 1 elif n=2 then 1 elif n=3 then 3 else 4*a(n-2)-a(n-4) fi end; [ seq(a(i),i=0..50) ];
    A002530:=-(-1-z+z**2)/(1-4*z**2+z**4); # conjectured (correctly) by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Join[{0},Table[Denominator[FromContinuedFraction[ContinuedFraction[Sqrt[3],n]]], {n,1,50}]] (* Stefan Steinerberger, Apr 01 2006 *)
    Join[{0},Denominator[Convergents[Sqrt[3],50]]] (* or *) LinearRecurrence[ {0,4,0,-1},{0,1,1,3},50] (* Harvey P. Dale, Jan 29 2013 *)
    a[ n_] := If[n<0, -(-1)^n, 1] SeriesCoefficient[ x*(1+x-x^2)/(1-4*x^2+x^4), {x, 0, Abs@n}]; (* Michael Somos, Apr 18 2019 *)
    a[ n_] := ChebyshevU[n-1, Sqrt[-1/2]]*Sqrt[2]^(Mod[n, 2]-1)/I^(n-1) //Simplify; (* Michael Somos, Nov 29 2022 *)
  • PARI
    {a(n) = if( n<0, -(-1)^n * a(-n), contfracpnqn(vector(n, i, 1 + (i>1) * (i%2)))[2, 1])}; /* Michael Somos, Jun 05 2003 */
    
  • PARI
    { for (n=0, 50, a=contfracpnqn(vector(n, i, 1+(i>1)*(i%2)))[2, 1]; write("b002530.txt", n, " ", a); ); } \\ Harry J. Smith, Jun 01 2009
    
  • PARI
    my(w=quadgen(12)); A002530(n)=real((2+w)^(n\/2)*if(bittest(n,0),1-w/3,w/3));
    apply(A002530, [0..30]) \\ M. F. Hasler, Nov 04 2019
    
  • Python
    from functools import cache
    @cache
    def a(n): return [0, 1, 1, 3][n] if n < 4 else 4*a(n-2) - a(n-4)
    print([a(n) for n in range(36)]) # Michael S. Branicky, Nov 13 2022
  • Sage
    (x*(1+x-x^2)/(1-4*x^2+x^4)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Feb 25 2019
    

Formula

G.f.: x*(1 + x - x^2)/(1 - 4*x^2 + x^4).
a(n) = 4*a(n-2) - a(n-4). [Corrected by László Szalay, Feb 21 2014]
a(n) = -(-1)^n * a(-n) for all n in Z, would satisfy the same recurrence relation. - Michael Somos, Jun 05 2003
a(2*n) = a(2*n-1) + a(2*n-2), a(2*n+1) = 2*a(2*n) + a(2*n-1).
From Benoit Cloitre, Dec 15 2002: (Start)
a(2*n) = ((2 + sqrt(3))^n - (2 - sqrt(3))^n)/(2*sqrt(3)).
a(2*n) = A001353(n).
a(2*n-1) = ceiling((1 + 1/sqrt(3))/2*(2 + sqrt(3))^n) = ((3 + sqrt(3))^(2*n - 1) + (3 - sqrt(3))^(2*n - 1))/6^n.
a(2*n-1) = A001835(n). (End)
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n - k, k) * 2^floor((n - 2*k)/2). - Paul Barry, Jul 13 2004
a(n) = Sum_{k=0..floor(n/2)} binomial(floor(n/2) + k, floor((n - 1)/2 - k))*2^k. - Paul Barry, Jun 22 2005
G.f.: (sqrt(6) + sqrt(3))/12*Q(0), where Q(k) = 1 - a/(1 + 1/(b^(2*k) - 1 - b^(2*k)/(c + 2*a*x/(2*x - g*m^(2*k)/(1 + a/(1 - 1/(b^(2*k + 1) + 1 - b^(2*k + 1)/(h - 2*a*x/(2*x + g*m^(2*k + 1)/Q(k + 1)))))))))). - Sergei N. Gladkovskii, Jun 21 2012
a(n) = (alpha^n - beta^n)/(alpha - beta) for n odd, and a(n) = (alpha^n - beta^n)/(alpha^2 - beta^2) for n even, where alpha = 1/2*(sqrt(2) + sqrt(6)) and beta = (1/2)*(sqrt(2) - sqrt(6)). Cf. A108412. - Peter Bala, Apr 18 2014
a(n) = (-sqrt(2)*i)^n*S(n, sqrt(2)*i)*2^(-floor(n/2)) = A002605(n)*2^(-floor(n/2)), n >= 0, with i = sqrt(-1) and S the Chebyshev polynomials (A049310). - Wolfdieter Lang, Feb 10 2018
a(n+1)*a(n+2) - a(n+3)*a(n) = (-1)^n, n >= 0. - Kai Wang, Feb 06 2020
E.g.f.: sinh(sqrt(3/2)*x)*(sinh(x/sqrt(2)) + sqrt(2)*cosh(x/sqrt(2)))/sqrt(3). - Stefano Spezia, Feb 07 2020
a(n) = ((1 + sqrt(3))^n - (1 - sqrt(3))^n)/(2*2^floor(n/2))/sqrt(3) = A002605(n)/2^floor(n/2). - Robert FERREOL, Apr 13 2023

Extensions

Definition edited by M. F. Hasler, Nov 04 2019

A041006 Numerators of continued fraction convergents to sqrt(6).

Original entry on oeis.org

2, 5, 22, 49, 218, 485, 2158, 4801, 21362, 47525, 211462, 470449, 2093258, 4656965, 20721118, 46099201, 205117922, 456335045, 2030458102, 4517251249, 20099463098, 44716177445, 198964172878, 442644523201, 1969542265682, 4381729054565, 19496458483942
Offset: 0

Views

Author

Keywords

Comments

Interspersion of 2 sequences, 2*A054320 and A001079. - Gerry Martens, Jun 10 2015

Crossrefs

Cf. A041007 (denominators).
Analog for other sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041008 (m=7), A041010 (m=8), A005667 (m=10), A041014 (m=11), ..., A042936 (m=1000).

Programs

  • Magma
    I:=[2, 5, 22, 49]; [n le 4 select I[n] else 10*Self(n-2)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Jun 10 2015
    
  • Mathematica
    Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[6],n]]],{n,1,50}] (* Vladimir Joseph Stephan Orlovsky, Mar 16 2011 *)
    LinearRecurrence[{0, 10, 0, -1}, {2, 5, 22, 49}, 50] (* Vincenzo Librandi, Jun 10 2015 *)
  • PARI
    A41006=contfracpnqn(c=contfrac(sqrt(6)), #c)[1, ][^-1] \\ Discard possibly incorrect last element. NB: a(n)=A41006[n+1]! M. F. Hasler, Nov 01 2019
    
  • PARI
    \\ For correct index & more terms:
    A041006(n)={n<#A041006|| A041006=extend(A041006, [2, 10; 4, -1], n\.8); A041006[n+1]}
    extend(A, c, N)={for(n=#A+1, #A=Vec(A, N), A[n]=[A[n-i]|i<-c[, 1]]*c[, 2]); A} \\ M. F. Hasler, Nov 01 2019

Formula

From M. F. Hasler, Feb 13 2009: (Start)
a(2n) = 2*A142238(2n) = A041038(2n)/2;
a(2n-1) = A142238(2n-1) = A041038(2n-1) = A001079(n). (End)
G.f.: (2 + 5*x + 2*x^2 - x^3)/(1 - 10*x^2 + x^4).
a(n) = ((2 + sqrt(6))^(n+1) + (2 - sqrt(6))^(n+1))/2^(ceiling(n/2) + 1). - Robert FERREOL, Oct 13 2024
E.g.f.: sqrt(2)*sinh(sqrt(2)*x)*(cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)) + cosh(sqrt(2)*x)*(2*cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)). - Stefano Spezia, Oct 14 2024

Extensions

More terms from Vincenzo Librandi, Jun 10 2015

A138288 a(n) = A054320(n) - A001078(n).

Original entry on oeis.org

1, 9, 89, 881, 8721, 86329, 854569, 8459361, 83739041, 828931049, 8205571449, 81226783441, 804062262961, 7959395846169, 78789896198729, 779939566141121, 7720605765212481, 76426118085983689, 756540575094624409, 7488979632860260401, 74133255753507979601, 733843577902219535609
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 12 2008

Keywords

Comments

Numbers k such that 6*k^2 - 2 is a square. - Bruno Berselli, Feb 10 2014

Examples

			1 + 9*x + 89*x^2 + 881*x^3 + 8721*x^4 + 86329*x^5 + ...
		

References

  • H. Brocard, Note #2049, L'Intermédiaire des Mathématiciens, 8 (1901), pp. 212-213. - N. J. A. Sloane, Mar 02 2022

Crossrefs

Cf. similar sequences listed in A238379.

Programs

  • Mathematica
    CoefficientList[Series[(1 - x)/(1 - 10 x + x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 12 2014 *)
    a[c_, n_] := Module[{},
      p := Length[ContinuedFraction[ Sqrt[ c]][[2]]];
      d := Denominator[Convergents[Sqrt[c], n p]];
      t := Table[d[[1 + i]], {i, 0, Length[d] - 1, p}];
      Return[t];
      ] (* Complement of A041007, A041039 *)
    a[6, 20] (* Gerry Martens, Jun 07 2015 *)
  • PARI
    {a(n) = subst( poltchebi(n+1) + poltchebi(n), x, 5) / 6} /* Michael Somos, Jan 25 2013 */
  • Sage
    [lucas_number1(n,10,1)-lucas_number1(n-1,10,1) for n in range(1, 20)] # Zerinvary Lajos, Nov 10 2009
    

Formula

a(n) = A072256(n+1).
a(n) = A001079(n) + 2*A001078(n).
a(n) = 10*a(n-1) - a(n-2). a(-1) = a(0) = 1.
(sqrt(2)+sqrt(3))^(2*n+1) = A054320(n-1)*sqrt(2) + a(n)*sqrt(3).
From Michael Somos, Jan 25 2013: (Start)
G.f.: (1 - x) / (1 - 10*x + x^2).
a(-1-n) = a(n). (End)
a(n) = sqrt(2+(5-2*sqrt(6))^(1+2*n)+(5+2*sqrt(6))^(1+2*n))/(2*sqrt(3)). - Gerry Martens, Jun 04 2015
E.g.f.: exp(5*x)*(3*cosh(2*sqrt(6)*x) + sqrt(6)*sinh(2*sqrt(6)*x))/3. - Stefano Spezia, May 16 2023

A142239 Denominators of continued fraction convergents to sqrt(3/2).

Original entry on oeis.org

1, 4, 9, 40, 89, 396, 881, 3920, 8721, 38804, 86329, 384120, 854569, 3802396, 8459361, 37639840, 83739041, 372596004, 828931049, 3688320200, 8205571449, 36510605996, 81226783441, 361417739760, 804062262961, 3577666791604, 7959395846169, 35415250176280
Offset: 0

Views

Author

N. J. A. Sloane, Oct 05 2008, following a suggestion from Rob Miller (rmiller(AT)AmtechSoftware.net)

Keywords

Comments

sqrt(3/2) = 1.224744871... = 2/2 + 2/9 + 2/(9*89) + 2/(89*881) + 2/(881*8721) + 2/(8721*86329) + ... - Gary W. Adamson, Oct 08 2008
From Charlie Marion, Jan 07 2009: (Start)
In general, denominators, a(k,n) and numerators, b(k,n), of continued fraction convergents to sqrt((k+1)/k) may be found as follows:
a(k,0) = 1, a(k,1) = 2k;
for n > 0, a(k,2n) = 2*a(k,2n-1)+a(k,2n-2) and a(k,2n+1)=(2k)*a(k,2n)+a(k,2n-1);
b(k,0) = 1, b(k,1) = 2k+1;
for n > 0, b(k,2n) = 2*b(k,2n-1)+b(k,2n-2) and b(k,2n+1)=(2k)*b(k,2n)+b(k,2n-1).
For example, the convergents to sqrt(3/2) start 1/1, 5/4, 11/9, 49/40, 109/89.
In general, if a(k,n) and b(k,n) are the denominators and numerators, respectively, of continued fraction convergents to sqrt((k+1)/k) as defined above, then
k*a(k,2n)^2 - a(k,2n-1)*a(k,2n+1) = k = k*a(k,2n-2)*a(k,2n) - a(k,2n-1)^2 and
b(k,2n-1)*b(k,2n+1) - k*b(k,2n)^2 = k+1 = b(k,2n-1)^2 - k*b(k,2n-2)*b(k,2n);
for example, if k=2 and n=3, then a(2,n)=a(n) and
2*a(2,6)^2 - a(2,5)*a(2,7) = 2*881^2 - 396*3920 = 2;
2*a(2,4)*a(2,6) - a(2,5)^2 = 2*89*881 - 396^2 = 2;
b(2,5)*b(2,7) - 2*b(2,6)^2 = 485*4801 - 2*1079^2 = 3;
b(2,5)^2 - 2*b(2,4)*b(2,6) = 485^2 - 2*109*1079 = 3.
(End)
For n > 0, a(n) equals the permanent of the n X n tridiagonal matrix with the main diagonal alternating sequence [4, 2, 4, 2, 4, ...] and 1's along the superdiagonal and the subdiagonal. - Rogério Serôdio, Apr 01 2018

Examples

			The initial convergents are 1, 5/4, 11/9, 49/40, 109/89, 485/396, 1079/881, 4801/3920, 10681/8721, 47525/38804, 105731/86329, ...
		

Crossrefs

Programs

  • Magma
    I:=[1,4,9,40]; [n le 4 select I[n] else 10*Self(n-2)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Feb 01 2014
  • Maple
    with(numtheory): cf := cfrac (sqrt(3)/sqrt(2),100): [seq(nthnumer(cf,i), i=0..50)]; [seq(nthdenom(cf,i), i=0..50)]; [seq(nthconver(cf,i), i=0..50)];
  • Mathematica
    Table[Denominator[FromContinuedFraction[ContinuedFraction[Sqrt[3/2], n]]], {n, 1, 50}] (* Vladimir Joseph Stephan Orlovsky, Jun 23 2011 *)
    Denominator[Convergents[Sqrt[3/2], 30]] (* Bruno Berselli, Nov 11 2013 *)

Formula

G.f.'s for numerators and denominators are -(1+5*x+x^2-x^3)/(-1-x^4+10*x^2) and -(1+4*x-x^2)/(-1-x^4+10*x^2).
a(n) = 10*a(n-2) - a(n-4) for n > 3. - Vincenzo Librandi, Feb 01 2014
From: Rogério Serôdio, Apr 02 2018: (Start)
Recurrence formula: a(n) = (3-(-1)^n)*a(n-1) + a(n-2), a(0) = 1, a(1) = 4;
Some properties:
(1) a(n)^2 - a(n-2)^2 = (3-(-1)^n)*a(2*n-1), for n > 1;
(2) a(2*n+1) = a(n)*(a(n+1) + a(n-1)), for n > 0;
(3) a(2*n) = A041007(2*n);
(4) a(2*n+1) = 2*A041007(2*n+1). (End)

A042937 Denominators of continued fraction convergents to sqrt(1000).

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 53, 114, 281, 4329, 8939, 22207, 142181, 164388, 306569, 470957, 777526, 1248483, 78183472, 79431955, 157615427, 237047382, 394662809, 631710191, 4184923955, 9001558101, 22188040157, 341822160456, 705832361069, 1753486882594
Offset: 0

Views

Author

Keywords

Examples

			sqrt(1000) = 31.62... = 31 + 1/(1 + 1/(1 + ...)) with convergents 31/1, 32/1, 63/2, 95/3, 158/5, ... - _M. F. Hasler_, Nov 02 2019
		

Crossrefs

Cf. A042936 (numerators), A040968 (continued fraction), A010467 (decimals).
Analog for sqrt(m): A000129 (m=2), A002530 (m=3), A001076 (m=5), A041007 (m=6), A041009 (m=7), A041011 (m=8), A005663 (m=10), A041015 (m=11), A041017 (m=12), ..., A042933 (m=998), A042935 (m=999).

Programs

  • Mathematica
    Denominator[Convergents[Sqrt[1000], 30]] (* Vincenzo Librandi, Feb 01 2014 *)
  • PARI
    A42937=contfracpnqn(c=contfrac(sqrt(1000)),#c-1)[2,] \\ Possibly incorrect last term ignored. NB: a(n) = A42937[n+1]. For more terms use e.g. \p999, or compute any a(n) from this as in A042936. - M. F. Hasler, Nov 01 2019

Extensions

More terms from Vincenzo Librandi, Feb 01 2014

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
Showing 1-9 of 9 results.