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.

Previous Showing 31-40 of 280 results. Next

A192750 Define a pair of sequences c_n, d_n by c_0=0, d_0=1 and thereafter c_n = c_{n-1}+d_{n-1}, d_n = c_{n-1}+4*n+2; sequence here is d_n.

Original entry on oeis.org

1, 6, 11, 21, 36, 61, 101, 166, 271, 441, 716, 1161, 1881, 3046, 4931, 7981, 12916, 20901, 33821, 54726, 88551, 143281, 231836, 375121, 606961, 982086, 1589051, 2571141, 4160196, 6731341, 10891541, 17622886, 28514431, 46137321, 74651756
Offset: 0

Views

Author

Clark Kimberling, Jul 09 2011

Keywords

Comments

Old definition was: constant term of the reduction by x^2->x+1 of the polynomial p(n,x) defined recursively by p(n,x) = x*p(n-1,x) + 4n+2 for n>0, with p(0,x)=1.
For discussions of polynomial reduction, see A192232 and A192744.

Crossrefs

Programs

  • Mathematica
    q = x^2; s = x + 1; z = 40;
    p[0, n_] := 1; p[n_, x_] := x*p[n - 1, x] + 4 n + 2;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] :=
    FixedPoint[(s PolynomialQuotient @@ #1 +
           PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}]
      (* A192750 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]
      (* A192751 *)
    LinearRecurrence[{2,0,-1},{1,6,11},40] (* Harvey P. Dale, Dec 03 2023 *)

Formula

G.f.: ( 1+4*x-x^2 ) / ( (x-1)*(x^2+x-1) ). The first differences are in A022088. - R. J. Mathar, May 04 2014
a(n) = 5*Fibonacci(n+2)-4. - Gerry Martens, Jul 04 2015
a(n) = A265752(A265750(n)). - Antti Karttunen, Dec 15 2015

Extensions

Entry revised by N. J. A. Sloane, Dec 15 2015

A192751 Define a pair of sequences c_n, d_n by c_0=0, d_0=1 and thereafter c_n = c_{n-1}+d_{n-1}, d_n = c_{n-1}+4*n+2; sequence here is c_n.

Original entry on oeis.org

0, 1, 7, 18, 39, 75, 136, 237, 403, 674, 1115, 1831, 2992, 4873, 7919, 12850, 20831, 33747, 54648, 88469, 143195, 231746, 375027, 606863, 981984, 1588945, 2571031, 4160082, 6731223, 10891419, 17622760, 28514301, 46137187, 74651618, 120788939
Offset: 0

Views

Author

Clark Kimberling, Jul 09 2011

Keywords

Comments

Old definition was: coefficient of x in the reduction under x^2->x+1 of the polynomial p(n,x) defined recursively by p(n,x) = x*p(n-1,x) + 4n+2 for n>0, with p(0,x)=1.
For discussions of polynomial reduction, see A192232 and A192744.

Crossrefs

Programs

  • Mathematica
    (See A192750.)
    CoefficientList[Series[x (x^2-4x-1)/((x-1)^2(x^2+x-1)),{x,0,40}],x] (* or *) LinearRecurrence[{3,-2,-1,1},{0,1,7,18},40] (* Harvey P. Dale, Feb 23 2022 *)

Formula

G.f.: x*(x^2-4*x-1)/((x-1)^2*(x^2+x-1)). First differences are in A192750. [Colin Barker, Nov 13 2012]
a(n) = 5*Fibonacci(n+3) - (4*n+10). - N. J. A. Sloane, Dec 15 2015
a(n) = A265753(A265750(n)). - Antti Karttunen, Dec 15 2015

Extensions

Description corrected by Antti Karttunen, Dec 15 2015
Entry revised by N. J. A. Sloane, Dec 15 2015

A192760 Coefficient of x in the reduction by x^2->x+1 of the polynomial p(n,x) defined below in Comments.

Original entry on oeis.org

0, 1, 4, 9, 18, 33, 58, 99, 166, 275, 452, 739, 1204, 1957, 3176, 5149, 8342, 13509, 21870, 35399, 57290, 92711, 150024, 242759, 392808, 635593, 1028428, 1664049, 2692506, 4356585, 7049122, 11405739, 18454894, 29860667, 48315596, 78176299
Offset: 0

Views

Author

Clark Kimberling, Jul 09 2011

Keywords

Comments

The titular polynomial is defined recursively by p(n,x)=x*(n-1,x)+n+2 for n>0, where p(0,x)=1. For discussions of polynomial reduction, see A192232 and A192744.
Form an array with m(1,j) = m(j,1) = j for j >= 1 in the top row and left column, and internal terms m(i,j) = m(i-1,j-1) + m(i-1,j). The sum of the terms in the n-th antidiagonal is a(n). - J. M. Bergot, Nov 07 2012

Crossrefs

Programs

  • Mathematica
    q = x^2; s = x + 1; z = 40;
    p[0, n_] := 1; p[n_, x_] := x*p[n - 1, x] + n + 2;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] :=
    FixedPoint[(s PolynomialQuotient @@ #1 +
           PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}]  (* A001594 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]  (* A192760 *)

Formula

a(n) = 2*A000045(n+3)-n-4. G.f. x*(-1-x+x^2) / ( (x^2+x-1)*(x-1)^2 ). - R. J. Mathar, Nov 09 2012
a(n) = Sum_{1..n} C(n-i+2,i+1) + C(n-i,i). - Wesley Ivan Hurt, Sep 13 2017

A192762 Coefficient of x in the reduction by x^2->x+1 of the polynomial p(n,x) defined below in Comments.

Original entry on oeis.org

0, 1, 6, 13, 26, 47, 82, 139, 232, 383, 628, 1025, 1668, 2709, 4394, 7121, 11534, 18675, 30230, 48927, 79180, 128131, 207336, 335493, 542856, 878377, 1421262, 2299669, 3720962, 6020663, 9741658, 15762355, 25504048, 41266439, 66770524
Offset: 0

Views

Author

Clark Kimberling, Jul 09 2011

Keywords

Comments

The titular polynomial is defined recursively by p(n,x)=x*(n-1,x)+n+4 for n>0, where p(0,x)=1. For discussions of polynomial reduction, see A192232 and A192744.

Crossrefs

Cf. A192744, A192232, A022319 (first differences).

Programs

  • Mathematica
    p[0, n_] := 1; p[n_, x_] := x*p[n - 1, x] + n + 4;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] :=
    FixedPoint[(s PolynomialQuotient @@ #1 +
           PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}]
      (* A022319 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]
      (* A192762 *)

Formula

a(n) = 3*a(n-1)-2*a(n-2)-a(n-3)+a(n-4). G.f.: x*(3*x^2-3*x-1) / ((x-1)^2*(x^2+x-1)). [Colin Barker, Dec 08 2012]

A192883 Constant term in the reduction by (x^2 -> x + 1) of the polynomial F(n+3)*x^n, where F = A000045 (Fibonacci sequence).

Original entry on oeis.org

2, 0, 5, 8, 26, 63, 170, 440, 1157, 3024, 7922, 20735, 54290, 142128, 372101, 974168, 2550410, 6677055, 17480762, 45765224, 119814917, 313679520, 821223650, 2149991423, 5628750626, 14736260448, 38580030725, 101003831720, 264431464442, 692290561599
Offset: 0

Views

Author

Clark Kimberling, Jul 12 2011

Keywords

Comments

See A192872.
a(n) is also the area of the triangle with vertices at (F(n),F(n+1)), (F(n+1),F(n)), and (F(n+3),F(n+4)) where F(n) = A000045(n). - J. M. Bergot, May 22 2014

Examples

			G.f. = 2 + 5*x^2 + 8*x^3 + 26*x^4 + 63*x^5 + 170*x^6 + ... - _Michael Somos_, Mar 18 2022
		

Crossrefs

Programs

  • GAP
    a:=[2,0,5];; for n in [4..30] do a[n]:=2*a[n-1]+2*a[n-2]-a[n-3]; od; a; # G. C. Greubel, Jan 09 2019
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( ( 2-4*x+x^2)/((1+x)*(1-3*x+x^2)) )); // G. C. Greubel, Jan 09 2019
    
  • Maple
    with(combinat):seq(fibonacci(n-1)*fibonacci(n+3), n=0..27): # Gary Detlefs, Oct 19 2011
  • Mathematica
    q = x^2; s = x + 1; z = 28;
    p[0, x_] := 2; p[1, x_] := 3 x;
    p[n_, x_] := p[n - 1, x]*x + p[n - 2, x]*x^2;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] := FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192883 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* minus A121646 *)
    LinearRecurrence[{2,2,-1}, {2,0,5}, 30] (* G. C. Greubel, Jan 09 2019 *)
    a[ n_] := Fibonacci[n+1]^2 + (-1)^n; (* Michael Somos, Mar 18 2022 *)
  • PARI
    a(n) = round((2^(-1-n)*(7*(-1)^n*2^(1+n)+(3-sqrt(5))^(1+n)+(3+sqrt(5))^(1+n)))/5) \\ Colin Barker, Sep 29 2016
    
  • PARI
    Vec((2+x^2-4*x)/((1+x)*(x^2-3*x+1)) + O(x^40)) \\ Colin Barker, Sep 29 2016
    
  • PARI
    {a(n) = fibonacci(n+1)^2 + (-1)^n}; /* Michael Somos, Mar 18 2022 */
    
  • Sage
    ((2-4*x+x^2 )/((1+x)*(1-3*x+x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 09 2019
    

Formula

a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
a(n) = Fibonacci(n-1) * Fibonacci(n+3). - Gary Detlefs, Oct 19 2011
a(n) = Fibonacci(n+1)^2 + (-1)^n. - Gary Detlefs, Oct 19 2011
G.f.: ( 2-4*x+x^2 ) / ( (1+x)*(1-3*x+x^2) ). - R. J. Mathar, May 07 2014
a(n) = (2^(-1-n)*(7*(-1)^n*2^(1+n) + (3-sqrt(5))^(1+n) + (3+sqrt(5))^(1+n)))/5. - Colin Barker, Sep 29 2016
From Amiram Eldar, Oct 06 2020: (Start)
Sum_{n>=2} 1/a(n) = 7/18.
Sum_{n>=2} (-1)^n/a(n) = (4/phi - 13/6)/3, where phi is the golden ratio (A001622). (End)
a(n) = a(-2-n) for all n in Z. - Michael Somos, Mar 18 2022

A192914 Constant term in the reduction by (x^2 -> x + 1) of the polynomial C(n)*x^n, where C=A000285.

Original entry on oeis.org

1, 0, 5, 9, 28, 69, 185, 480, 1261, 3297, 8636, 22605, 59185, 154944, 405653, 1062009, 2780380, 7279125, 19057001, 49891872, 130618621, 341963985, 895273340, 2343856029, 6136294753, 16065028224, 42058789925, 110111341545, 288275234716, 754714362597
Offset: 0

Views

Author

Clark Kimberling, Jul 12 2011

Keywords

Comments

See A192872.

Crossrefs

Programs

  • GAP
    F:=Fibonacci; List([0..30], n -> F(n+1)^2 +F(n)*F(n-3)); # G. C. Greubel, Jan 12 2019
  • Magma
    F:=Fibonacci; [F(n+1)^2+F(n)*F(n-3): n in [0..30]]; // Bruno Berselli, Feb 15 2017
    
  • Mathematica
    q = x^2; s = x + 1; z = 28;
    p[0, x_]:= 1; p[1, x_]:= 4 x;
    p[n_, x_] := p[n-1, x]*x + p[n-2, x]*x^2;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}]:= FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192914 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* see A192878 *)
    LinearRecurrence[{2,2,-1}, {1,0,5}, 30] (* or *) With[{F:= Fibonacci}, Table[F[n+1]^2 +F[n]*F[n-3], {n, 0, 30}]] (* G. C. Greubel, Jan 12 2019 *)
  • PARI
    a(n) = round((2^(-1-n)*(3*(-1)^n*2^(2+n)+(3+sqrt(5))^n*(-1+3*sqrt(5))-(3-sqrt(5))^n*(1+3*sqrt(5))))/5) \\ Colin Barker, Sep 29 2016
    
  • PARI
    Vec((1+3*x^2-2*x)/((1+x)*(x^2-3*x+1)) + O(x^30)) \\ Colin Barker, Sep 29 2016
    
  • PARI
    {f=fibonacci}; vector(30, n, n--; f(n+1)^2 +f(n)*f(n-3)) \\ G. C. Greubel, Jan 12 2019
    
  • Sage
    f=fibonacci; [f(n+1)^2 +f(n)*f(n-3) for n in (0..30)] # G. C. Greubel, Jan 12 2019
    

Formula

a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
G.f.: (1 + 3*x^2 - 2*x)/((1 + x)*(x^2 - 3*x + 1)). - R. J. Mathar, May 08 2014
a(n) = (2^(-1-n)*(3*(-1)^n*2^(2+n) + (3 + sqrt(5))^n*(-1 + 3*sqrt(5)) - (3-sqrt(5))^n*(1 + 3*sqrt(5))))/5. - Colin Barker, Sep 29 2016
a(n) = F(n+1)^2 + F(n)*F(n-3). - Bruno Berselli, Feb 15 2017

A192969 Constant term of the reduction by x^2 -> x+1 of the polynomial p(n,x) defined at Comments.

Original entry on oeis.org

1, 2, 6, 12, 23, 41, 71, 120, 200, 330, 541, 883, 1437, 2334, 3786, 6136, 9939, 16093, 26051, 42164, 68236, 110422, 178681, 289127, 467833, 756986, 1224846, 1981860, 3206735, 5188625, 8395391, 13584048, 21979472, 35563554, 57543061, 93106651
Offset: 0

Views

Author

Clark Kimberling, Jul 13 2011

Keywords

Comments

The titular polynomials are defined recursively: p(n,x) = x*p(n-1,x) + n(n+3)/2, with p(0,x)=1. For an introduction to reductions of polynomials by substitutions such as x^2->x+1, see A192232 and A192744.

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> 2*F(n+2)+3*F(n+1)-n-4); # G. C. Greubel, Jul 11 2019
  • Magma
    F:=Fibonacci; [2*F(n+2)+3*F(n+1)-n-4: n in [0..40]]; // G. C. Greubel, Jul 11 2019
    
  • Maple
    F:= gfun:-rectoproc({a(0) = 1, a(1) = 2, a(n) = 1 + n + a(n-1) + a(n-2)},a(n),remember):
    map(F, [$0..100]); # Robert Israel, Jan 18 2016
  • Mathematica
    (* First progream *)
    q = x^2; s = x + 1; z = 40;
    p[0, x] := 1;
    p[n_, x_] := x*p[n - 1, x] + n (n + 3)/2;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] :=
    FixedPoint[(s PolynomialQuotient @@ #1 +PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192969 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192970 *)
    (* Second program *)
    Table[2*Fibonacci[n+2]+3*Fibonacci[n+1]-n-4, {n,0,40}] (* G. C. Greubel, Jul 11 2019 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 2*f(n+2)+3*f(n+1)-n-4) \\ G. C. Greubel, Jul 11 2019
    
  • Sage
    f=fibonacci; [2*f(n+2)+3*f(n+1)-n-4 for n in (0..40)] # G. C. Greubel, Jul 11 2019
    
  • Sidef
    func a((0)) { 1 }
    func a((1)) { 2 }
    func a(n) is cached { 1 + n + a(n-1) + a(n-2) }
    100.times { |i| say a(i-1) }
    # Daniel Suteu, Jan 12 2016
    

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: (1 - x + 2*x^2 - x^3)/((1-x-x^2)*(1-x)^2). - R. J. Mathar, May 11 2014
a(0) = 1; a(1) = 2; a(n) = 1 + n + a(n-1) + a(n-2). - Daniel Suteu, Jan 12 2016
a(n) = 2*Fibonacci(n+2) + 3*Fibonacci(n+1) - n - 4. - G. C. Greubel, Jul 11 2019

A049602 a(n) = (Fibonacci(2*n)-(-1)^n*Fibonacci(n))/2.

Original entry on oeis.org

0, 1, 1, 5, 9, 30, 68, 195, 483, 1309, 3355, 8900, 23112, 60813, 158717, 416325, 1088661, 2852242, 7463884, 19546175, 51163695, 133962621, 350695511, 918170280, 2403740304, 6293172025, 16475579353, 43133883845, 112925557953
Offset: 0

Views

Author

Keywords

Comments

A049602 gives the coefficients of x in the reduction of the polynomial p(n,x)=(1/2)((x+1)^n+(x-1)^n) by x^2->x+1. For the constant terms, see A192352. For an introduction to reductions of polynomials by substitutions such as x^2->x+1, see A192232. - Clark Kimberling, Jun 29 2011

Crossrefs

Cf. A049601.

Programs

Formula

a(n)=Sum{T(2i+1, n-2i-1): i=0, 1, ..., [ (n+1)/2 ]}, array T as in A049600.
Cosh transform of Fibonacci numbers A000045 (or mean of binomial and inverse binomial transforms of A000045). E.g.f.: cosh(x)(2/sqrt(5))*exp(x/2)*sinh(sqrt(5)*x/2). - Paul Barry, May 10 2003
a(n)=sum{k=0..floor(n/2), C(n, 2k)Fib(n-2k)}; - Paul Barry, May 01 2005
a(n)=2a(n-1)+3a(n-2)-4a(n-3)+a(n-4). - Paul Curtz, Jun 16 2008
G.f.: x(1-x)/((1+x-x^2)(1-3x+x^2)); a(n)=sum{k=0..n-1, (-1)^(n-k+1)*F(2k+2)*F(n-k+1)}; - Paul Barry, Jul 11 2008

Extensions

Simpler description from Vladeta Jovovic and Thomas Baruchel, Aug 24 2004
More terms from Paul Curtz, Jun 16 2008

A086344 a(n) = -2*a(n-1) + 4*a(n-2), a(0) = 1, a(1) = 0.

Original entry on oeis.org

1, 0, 4, -8, 32, -96, 320, -1024, 3328, -10752, 34816, -112640, 364544, -1179648, 3817472, -12353536, 39976960, -129368064, 418643968, -1354760192, 4384096256, -14187233280, 45910851584, -148570636288, 480784678912, -1555851902976, 5034842521600, -16293092655104
Offset: 0

Views

Author

Paul Barry, Jul 17 2003

Keywords

Comments

Inverse binomial transform of (1,1,5,5,25,25,.....).
The absolute values are the constant terms of the reduction by x^2->x+1 of the polynomial p(n,x) given for d=sqrt(x+1) by p(n,x)=((x+d)^n-(x-d)^n)/(2d), for n>=1. The coefficient of x under this reduction is given by A103435. See A192232 for a discussion of reduction. - Clark Kimberling, Jun 29 2011

Programs

  • Maple
    seq((-2)^n * combinat:-fibonacci(n-1), n = 0 .. 100); # Robert Israel, Oct 02 2014
  • Mathematica
    LinearRecurrence[{-2,4},{1,0},40] (* Harvey P. Dale, Oct 10 2018 *)

Formula

G.f.: (1+2*x)/((1+(1+sqrt(5))*x)(1+(1-sqrt(5))*x)) = ( -1-2*x ) / ( -1-2*x+4*x^2 ).
E.g.f.: exp(-x)*(cosh(sqrt(5)*x)+sinh(sqrt(5)*x)/sqrt(5)).
a(n)=(sqrt(5)-1)^n*(sqrt(5)/10+1/2)+(-sqrt(5)-1)^n*(1/2-sqrt(5)/10).
(-1)^n*a(n) = A063727(n) - 2*A063727(n-1). - R. J. Mathar, Jul 19 2012
(-1)^n*a(n) = sum(k=0..n, binomial(n,k)*(F(n+1)-F(n))), F(n) Fibonacci number A000045. - Peter Luschny, Oct 01 2014
a(n) = (-2)^n *A000045(n-1). - Robert Israel, Oct 02 2014

A192236 Coefficient of x in the reduction of the n-th 2nd-kind Chebyshev polynomial by x^2 -> x+1.

Original entry on oeis.org

2, 4, 12, 36, 102, 296, 856, 2472, 7146, 20652, 59684, 172492, 498510, 1440720, 4163760, 12033488, 34777426, 100508628, 290475324, 839489268, 2426169014, 7011758584, 20264358408, 58565082744, 169256230458, 489159584636, 1413697437268
Offset: 1

Views

Author

Clark Kimberling, Jun 26 2011

Keywords

Comments

See A192232.

Crossrefs

Programs

  • GAP
    a:=[2,4,12,36];; for n in [5..40] do a[n]:=2*a[n-1]+2*a[n-2]+ 2*a[n-3]-a[n-4]; od; a; # G. C. Greubel, Jul 30 2019
  • Magma
    I:=[2,4,12,36]; [n le 4 select I[n] else 2*Self(n-1) +2*Self(n-2) +2*Self(n-3) -Self(n-4): n in [1..40]]; // G. C. Greubel, Jul 30 2019
    
  • Mathematica
    q[x_]:= x + 1; m:=40;
    reductionRules = {x^y_?EvenQ -> q[x]^(y/2), x^y_?OddQ -> x q[x]^((y - 1)/2)};
    t = Table[Last[Most[FixedPointList[Expand[#1 /. reductionRules] &, ChebyshevU[n, x]]]], {n, m}];
    Table[Coefficient[Part[t, n], x, 0], {n, m}] (* A192235 *)
    Table[Coefficient[Part[t, n], x, 1], {n, m}] (* A192236 *)
    Table[Coefficient[Part[t, n]/2, x, 1], {n, m}] (* A192237 *)
    (* Peter J. C. Moses, Jun 25 2011 *)
    LinearRecurrence[{2,2,2,-1}, {2,4,12,36}, 40] (* G. C. Greubel, Jul 30 2019 *)
  • PARI
    m=40; v=concat([2,4,12,36], vector(m-4)); for(n=5, m, v[n] = 2*v[n-1]+2*v[n-2]+2*v[n-3]-v[n-4]); v \\ G. C. Greubel, Jul 30 2019
    
  • Sage
    def a(n):
        if (n==0): return 2
        elif (1 <= n <= 3): return 4*3^(n-1)
        else: return 2*(a(n-1) + a(n-2) + a(n-3)) - a(n-4)
    [a(n) for n in (0..40)] # G. C. Greubel, Jul 30 2019
    

Formula

a(n) = 2*A192237(n+2).
G.f.: 2*x/(1-2*x-2*x^2-2*x^3+x^4). - Colin Barker, Sep 12 2012
Previous Showing 31-40 of 280 results. Next