A049072 Expansion of 1/(1 - 3*x + 4*x^2).
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
Examples
G.f.: 1 + 3*x + 5*x^2 + 3*x^3 - 11*x^4 - 45*x^5 - 91*x^6 - 93*x^7 + ...
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- B. R. Myers, On Spanning Trees, Weighted Compositions, Fibonacci Numbers, and Resistor Networks, SIAM Rev., 17 (1975), 465-474.
- Index entries for linear recurrences with constant coefficients, signature (3,-4).
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
Comments