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.

A316528 a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) for n > 2, a(0)=1, a(1)=4, a(2)=10.

Original entry on oeis.org

1, 4, 10, 24, 54, 118, 252, 530, 1102, 2272, 4654, 9486, 19260, 38986, 78726, 158672, 319318, 641830, 1288828, 2586018, 5185566, 10393024, 20821470, 41700254, 83493244, 167136538, 334515862, 669424560, 1339484742, 2679997942, 5361659964, 10726012466, 21456381550
Offset: 0

Views

Author

Vincenzo Librandi, Jul 14 2018

Keywords

Comments

Row sums of triangle A316939.

Crossrefs

Programs

  • GAP
    a:=[1,4,10];; for n in [4..35] do a[n]:=3*a[n-1]-a[n-2]-2*a[n-3]; od; a; # Muniru A Asiru, Jul 14 2018
    
  • Magma
    I:=[1,4,10]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2)-2*Self(n-3): n in [1..40]];
    
  • Maple
    seq(coeff(series((1+x-x^2)/(1-3*x+x^2+2*x^3), x,n+1),x,n),n=0..35); # Muniru A Asiru, Jul 14 2018
  • Mathematica
    RecurrenceTable[{a[n] == 3 a[n - 1] - a[n - 2] - 2 a[n - 3], a[0] == 1, a[1] == 4, a[2] == 10}, a, {n, 0, 40}]
    Table[5 2^n - 2 Fibonacci[n + 3], {n, 0, 40}] (* Bruno Berselli, Jul 16 2018 *)
    LinearRecurrence[{3,-1,-2},{1,4,10},40] (* Harvey P. Dale, Jul 18 2020 *)
  • PARI
    Vec((1 + x - x^2)/((1 - 2*x)*(1 - x - x^2)) + O(x^40)) \\ Colin Barker, Jul 23 2018

Formula

G.f.: (1 + x - x^2)/((1 - 2*x)*(1 - x - x^2)).
a(n) = 2*A116712(n) for n > 0, a(0)=1.
a(n) = 5*2^n - 2*Fibonacci(n+3). - Bruno Berselli, Jul 16 2018
a(n) = (5*2^n - (2^(1-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5))))/sqrt(5)). - Colin Barker, Jul 23 2018