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.

A106392 Expansion of 1/(1 - 6*x + 10*x^2).

Original entry on oeis.org

1, 6, 26, 96, 316, 936, 2456, 5376, 7696, -7584, -122464, -658944, -2729024, -9784704, -31417984, -90660864, -229785344, -472103424, -534767104, 1512431616, 14422260736, 71409248256, 284232882176, 991304810496, 3105500041216, 8719952142336, 21264712441856, 40388753227776
Offset: 0

Views

Author

Paul Barry, May 01 2005

Keywords

Comments

In general, the sequence with g.f. 1/(1 - 2r*x + (r^2 + 1)*x^2) = 1/((1 - r*x)^2 + x^2) has a(n) = Sum_{k = 0..floor(n/2)} binomial(n - k, k)(r^2 - 1)^k*(2r)^(n - 2k); a(n) = Sum_{k = 0..floor((n + 1)/2)} binomial(n + 1, 2k + 1)(-1)^k*r^(n-2k).

Programs

  • Maple
    f:= gfun:- rectoproc({a(n+2)=6*a(n+1)-10*a(n),a(0)=1,a(1)=6},a(n),remember):
    map(f, [$0..50]); # Robert Israel, Nov 25 2016
  • Mathematica
    CoefficientList[Series[1/(1 - 6x + 10x^2), {x, 0, 30}], x] (* or *) LinearRecurrence[{6, -10}, {1, 6}, 30] (* Harvey P. Dale, Feb 05 2015 *)
  • PARI
    imag((3+I)^(n+1)); /* Joerg Arndt, Sep 20 2012 */
    
  • PARI
    x='x+O('x^100); Vec(1/((1-3*x)^2+x^2)) \\ Altug Alkan, Dec 24 2015
  • Sage
    [lucas_number1(n,6,10) for n in range(1, 29)] # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: 1/((1 - 3*x)^2 + x^2).
a(n) = Sum_{k = 0..floor(n/2)} binomial(n - k, k)(-10)^k*6^(n - 2k).
a(n) = Sum_{k = 0..floor((n + 1)/2)} binomial(n + 1, 2k + 1)(-1)^k*3^(n - 2k).
a(n) = 6*a(n - 1) - 10*a(n - 2), n >= 2. - Vincenzo Librandi, Mar 22 2011
a(n) = Im((3 + i)^(n + 1)), where i = sqrt(-1). - César Eliud Lozada, Sep 19 2012
E.g.f.: (3*sin(x) + cos(x))*exp(3*x). - Ilya Gutkovskiy, Nov 25 2016