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.

A085939 Horadam sequence (0,1,6,4).

Original entry on oeis.org

0, 1, 4, 22, 112, 580, 2992, 15448, 79744, 411664, 2125120, 10970464, 56632576, 292353088, 1509207808, 7790949760, 40219045888, 207621882112, 1071801803776, 5532938507776, 28562564853760
Offset: 0

Views

Author

Ross La Haye, Aug 16 2003

Keywords

Comments

a(n) / a(n-1) converges to sqrt(10) + 2 as n approaches infinity; sqrt(10) + 2 can also be written as sqrt(2) * (sqrt(2) + sqrt(5)), 2 * sqrt(2) * Phi - sqrt(2) + 2 and lim_{n->infinity} sqrt(2) * (sqrt(2) + (L(n) / F(n))), where L(n) is the n-th Lucas number and F(n) is the n-th Fibonacci number.

Examples

			a(4) = 112 because a(3) = 22, a(2) = 4, s = 4, r = 6 and (4 * 22) + (6 * 4) = 112.
		

Crossrefs

Programs

  • Magma
    I:=[0,1]; [n le 2 select I[n] else 4*Self(n-1) + 6*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 16 2018
  • Mathematica
    Join[{a=0,b=1},Table[c=4*b+6*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 16 2011 *)
    LinearRecurrence[{4,6},{0,1},30] (* Harvey P. Dale, Jul 20 2016 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(x/(1-4*x-6*x^2))) \\ G. C. Greubel, Jan 16 2018
    
  • Sage
    [lucas_number1(n,4,-6) for n in range(0, 21)] # Zerinvary Lajos, Apr 23 2009
    

Formula

a(n) = s*a(n-1) + r*a(n-2); for n > 1, where a(0) = 0, a(1) = 1, s = 4, r = 6.
a(n) = ((2+sqrt(10))^n - (2-sqrt(10))^n)/(2*sqrt(10)). - Rolf Pleisch, Jul 06 2009
G.f.: x/(1-4*x-6*x^2). - Colin Barker, Jan 10 2012