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.

A136210 Numerators in continued fraction [0; 1, 3, 1, 3, 1, 3, ...].

Original entry on oeis.org

1, 3, 4, 15, 19, 72, 91, 345, 436, 1653, 2089, 7920, 10009, 37947, 47956, 181815, 229771, 871128, 1100899, 4173825, 5274724, 19997997, 25272721, 95816160, 121088881, 459082803, 580171684, 2199597855, 2779769539, 10538906472
Offset: 1

Views

Author

Gary W. Adamson, Dec 21 2007

Keywords

Comments

A136210(n)/A136211(n) tends to 0.7912878474... = (sqrt(21) - 3)/2 = continued fraction [0; 1, 3, 1, 3, 1, 3, ...] = the inradius of a right triangle with hypotenuse 5, legs 2 and sqrt(21).
This 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, May 14 2014

Examples

			a(4) = 15 = 3*a(3) + a(2) = 3*4 + 3.
a(5) = 19 = a(4) + a(3) = 15 + 4.
T^3 = [19, 72; 24, 91], where [19, 72] = [a(5), a(6)]. [24, 91] = [A136211(5), A136211(6)].
G.f. = x + 3*x^2 + 4*x^3 + 15*x^4 + 19*x^5 + 72*x^6 + 91*x^7 + 345*x^8 + ...
		

Crossrefs

Programs

  • Mathematica
    a = {1, 3}; Do[If[EvenQ[n], AppendTo[a, 3*a[[ -1]] + a[[ -2]]], AppendTo[a, a[[ -1]] + a[[ -2]]]], {n, 3, 30}]; a (* Stefan Steinerberger, Dec 31 2007 *)
    a[n_] := FromContinuedFraction[ Join[{0}, 3 - 2*Array[Mod[#, 2]&, n]]] // Numerator; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, May 15 2014 *)
  • PARI
    {a(n) = (-1)^((n+1) * (n<0)) * polcoeff( x * (1 + 3*x - x^2) / (1 - 5*x^2 + x^4) + x * O(x^abs(n)), abs(n))}; /* Michael Somos, May 15 2014 */

Formula

a(0) = 0, a(1) = 1, a(2n) = 3*a(2n-1) + a(2n-2); a(2n-1) = a(2n-2) + a(2n-3). Given the 2 X 2 matrix [1, 3; 1, 4] = T, [a(2n-1), a(2n)] = top row of T^n.
g.f.: x*(1+3*x-x^2)/(1-5*x^2+x^4). - Colin Barker, Jan 04 2012
a(-n) = -(-1)^n * a(n). a(2*n - 1) = A004253(n). a(2*n) = 3 * A004254(n). - Michael Somos, May 15 2014
a(n+1) - a(n-1) = a(n) * (2 - (-1)^n) for all n in Z. - Michael Somos, May 15 2014

Extensions

More terms from Stefan Steinerberger, Dec 31 2007