OFFSET
1,2
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
LINKS
J. L. Ramirez, F. Sirvent, A q-Analogue of the Bi-Periodic Fibonacci Sequence, J. Int. Seq. 19 (2016) # 16.4.6, t_n at a=3, b=1.
Index entries for linear recurrences with constant coefficients, signature (0,5,0,-1).
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
EXAMPLE
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 *)
PROG
(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 */
CROSSREFS
KEYWORD
nonn,frac,easy
AUTHOR
Gary W. Adamson, Dec 21 2007
EXTENSIONS
More terms from Stefan Steinerberger, Dec 31 2007
STATUS
approved