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

A049072 Expansion of 1/(1 - 3*x + 4*x^2).

Original entry on oeis.org

1, 3, 5, 3, -11, -45, -91, -93, 85, 627, 1541, 2115, 181, -7917, -24475, -41757, -27371, 84915, 364229, 753027, 802165, -605613, -5025499, -12654045, -17860139, -2964237, 62547845, 199500483, 348310069, 246928275, -652455451, -2945079453, -6225416555
Offset: 0

Views

Author

Keywords

Comments

From Sharon Sela (sharonsela(AT)hotmail.com), Jan 22 2002: (Start)
a(n) is the determinant of the following tridiagonal n X n matrix:
[3 2 0 0 .... ]
[2 3 2 0 .... ]
[0 2 3 2 0 .. ]
[. 0 2 3 2 .. ]
[. . . . .... ]
[. . . 2 3 2 0]
[. . . 0 2 3 2]
[. . . 0 0 2 3]
(End)
With offset 1 (a(0) = 0, a(1) = 1) this is a divisibility sequence. - R. K. Guy, May 19 2015
With offset 1 (a(0) = 0, a(1) = 1), then this is the Lucas sequence U_n(P, Q) = U_n(3, 4). V_n(P, Q) = V_n(3, 4) = A247563(n). Again with offset 1 (a(0) = 0, a(1) = 1), then (A247563(n)/2)^2 + 7(a(n)/2)^2 = 4^n. This is a specific case of the Lucas sequence identity (V_n/2)^2 - D*(U_n/2)^2 = Q^n where V_n = (a^n + b^n), U_n = (a^n - b^n)/(a - b), Q = (a*b) = 4 and D = (a - b)^2 = -7; a = (3 + sqrt(-7))/2 and b = (3 - sqrt(-7))/2. - Raphie Frank, Dec 04 2015

Examples

			G.f.: 1 + 3*x + 5*x^2 + 3*x^3 - 11*x^4 - 45*x^5 - 91*x^6 - 93*x^7 + ...
		

Crossrefs

Programs

  • Haskell
    a049072 n = a049072_list !! n
    a049072_list = 1 : 3 :
        zipWith (-) (map (* 3) $ tail a049072_list) (map (* 4) a049072_list)
    -- Reinhard Zumkeller, Oct 25 2013
    
  • Magma
    I:=[1,3]; [n le 2 select I[n] else 3*Self(n-1)-4*Self(n-2): n in [1..50]]; // Vincenzo Librandi, Jun 12 2015
    
  • Maple
    A049072:=n->(-1)^n*add(binomial(2*n-k+1,k)*(-2)^k, k=0..n): seq(A049072(n), n=0..40); # Wesley Ivan Hurt, Dec 05 2015
  • Mathematica
    Join[{a=1,b=3},Table[c=3*b-4*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 17 2011 *)
    a[ n_] := ChebyshevU[ n, 3/4] 2^n; (* Michael Somos, Jun 03 2015 *)
    a[ n_] := Module[ {m = n + 1, s = 1}, If[ m < 0, {m, s} = -{m, 4^m}]; s SeriesCoefficient[ x / (1 - 3 x + 4 x^2), {x, 0, m}]]; (* Michael Somos, Jun 03 2015 *)
  • PARI
    {a(n) = 2^n * subst( -3*poltchebi(n+1) + 4*poltchebi(n), 'x, 3/4) * 4/7}; /* Michael Somos, Sep 15 2005 */
    
  • PARI
    {a(n) = if(n<0, 0, matdet(matrix(n, n, i, j, if(abs(i-j)<2, 3-abs(i-j)))))} /* Michael Somos, Sep 15 2005 */
    
  • PARI
    {a(n) = polchebyshev(n, 2, 3/4) * 2^n}; /* Michael Somos, Jun 03 2015 */
    
  • PARI
    x='x+O('x^100); Vec(1/(1-3*x+4*x^2)) \\ Altug Alkan, Dec 04 2015
  • Sage
    [lucas_number1(n,3,4) for n in range(1, 34)] # Zerinvary Lajos, Apr 23 2009
    

Formula

G.f.: 1/(1 - 3*x + 4*x^2).
a(n) = (-1)^n * Sum_{k=0..n} binomial(2n-k+1, k)*(-2)^k. - Paul Barry, Jan 17 2005
a(n) = 3*a(n-1) - 4*a(n-2); a(0)=1, a(1)=3. - Sergei N. Gladkovskii, Mar 14 2013
G.f.: 1/(1/Q(0)+2*x^3) where Q(k) = 1 + k*(2*x+1) + 8*x - 2*x*(k+1)*(k+5)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Mar 14 2013
a(n) = - a(-2-n) * 4^(n+1) for all n in Z. - Michael Somos, Jun 03 2015
a(n - 1) = (((3 + sqrt(-7))/2)^n - ((3 - sqrt(-7))/2)^n)/(((3 + sqrt(-7))/2) - ((3 - sqrt(-7))/2)). - Raphie Frank, Dec 04 2015

A127357 Expansion of 1/(1 - 2*x + 9*x^2).

Original entry on oeis.org

1, 2, -5, -28, -11, 230, 559, -952, -6935, -5302, 51811, 151340, -163619, -1689298, -1906025, 11391632, 39937489, -22649710, -404736821, -605626252, 2431378885, 10313394038, -1255621889
Offset: 0

Views

Author

Paul Barry, Jan 11 2007

Keywords

Comments

Hankel transform of A100193. A member of the family of sequences with g.f. 1/(1-2*x+r^2*x^2) which are the Hankel transforms of the sequences given by Sum_{k=0..n} binomial(2*n,k)*r^(n-k).
From Peter Bala, Apr 01 2018: (Start)
With offset 1, this is the Lucas sequence U(n,2,9). The companion Lucas sequence V(n,2,9) is 2*A025172(n).
Define a binary operation o on rational numbers by x o y = (x + y)/(1 - 2*x*y). This is a commutative and associative operation with identity 0. Then 2 o 2 o ... o 2 (n terms) = 2*A127357(n-1)/A025172(n). Cf. A088137 and A087455. (End)

Crossrefs

Programs

  • GAP
    a:=[1,2];; for n in [3..25] do a[n]:=2*a[n-1]-9*a[n-2]; od; a; # Muniru A Asiru, Oct 23 2018
  • Magma
    m:=23; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1-2*x+9*x^2))); // Bruno Berselli, Jul 01 2011
    
  • Magma
    [3^n*Evaluate(ChebyshevU(n+1),1/3): n in [0..50]]; // G. C. Greubel, Jan 02 2024
    
  • Maple
    c := 2*sqrt(2): g := exp(x)*(sin(c*x)+c*cos(c*x))/c: ser := series(g,x,32):
    seq(n!*coeff(ser,x,n), n=0..22); # Peter Luschny, Oct 19 2016
  • Mathematica
    RootReduce@Table[3^n (Cos[n ArcTan[2 Sqrt[2]]] + Sin[n ArcTan[2 Sqrt[2]]] Sqrt[2]/4), {n, 0, 20}] (* Vladimir Reshetnikov, Oct 15 2016 *)
    CoefficientList[Series[1/(1-2x+9x^2),{x,0,40}],x] (* or *)
    LinearRecurrence[ {2,-9},{1,2},40] (* Harvey P. Dale, Mar 15 2022 *)
    Table[3^n*ChebyshevU[n, 1/3], {n,0,40}] (* G. C. Greubel, Jan 02 2024 *)
  • Maxima
    makelist(coeff(taylor(1/(1-2*x+9*x^2), x, 0, n), x, n), n, 0, 22); /* Bruno Berselli, Jul 01 2011 */
    
  • PARI
    Vec(1/(1-2*x+9*x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • Sage
    [lucas_number1(n,2,9) for n in range(1, 24)] # Zerinvary Lajos, Apr 23 2009
    
  • SageMath
    [3^n*chebyshev_U(n,1/3) for n in range(41)] # G. C. Greubel, Jan 02 2024
    

Formula

a(n) = Sum_{k=0..n} binomial(n-k,k)*2^(n-2*k)*(-9)^k.
a(n) = 2*a(n-1) - 9*a(n-2) for n >= 2. - Vincenzo Librandi, Mar 22 2011
a(n) = ((1-2*sqrt(2)*i)^n-(1+2*sqrt(2)*i)^n)*i/(4*sqrt(2)), where i=sqrt(-1). - Bruno Berselli, Jul 01 2011
From Vladimir Reshetnikov, Oct 15 2016: (Start)
a(n) = 3^n*(cos(n*theta) + sin(n*theta)*sqrt(2)/4), theta = arctan(2*sqrt(2)).
E.g.f.: exp(x)*(cos(2*sqrt(2)*x) + sin(2*sqrt(2)*x)*sqrt(2)/4). (End)
a(n) = 2^n*Product_{k=1..n}(1 + 3*cos(k*Pi/(n+1))). - Peter Luschny, Nov 28 2019
From G. C. Greubel, Jan 02 2024: (Start)
a(n) = (-1)^n * A025170(n).
a(n) = 3^n * ChebyshevU(n, 1/3). (End)
Showing 1-2 of 2 results.