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.

A182415 a(0) = 1, a(1) = 2; for n>1, a(n) = a(n-1) + a(n-2) + 4.

Original entry on oeis.org

1, 2, 7, 13, 24, 41, 69, 114, 187, 305, 496, 805, 1305, 2114, 3423, 5541, 8968, 14513, 23485, 38002, 61491, 99497, 160992, 260493, 421489, 681986, 1103479, 1785469, 2888952, 4674425, 7563381, 12237810, 19801195, 32039009, 51840208, 83879221, 135719433, 219598658
Offset: 0

Views

Author

Alex Ratushnyak, Apr 28 2012

Keywords

Examples

			a(3) = 7 + 2 + 4 = 13.
		

Crossrefs

Cf. A000045, A014739, A022095 (first differences), A171516.

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+3)+3*F(n+1)-4); # G. C. Greubel, Jul 22 2019
  • Magma
    F:=Fibonacci; [F(n+3)+3*F(n+1)-4: n in [0..40]]; // G. C. Greubel, Jul 22 2019
    
  • Mathematica
    With[{f=Fibonacci}, Table[F[n+3]+3*F[n+1]-4, {n,0,40}]] (* G. C. Greubel, Jul 22 2019 *)
    RecurrenceTable[{a[0]==1,a[1]==2,a[n]==a[n-1]+a[n-2]+4},a,{n,40}] (* or *) LinearRecurrence[{2,0,-1},{1,2,7},40] (* Harvey P. Dale, Nov 24 2020 *)
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+3) +3*f(n+1) -4 ) \\ G. C. Greubel, Jul 22 2019
    
  • Sage
    f=fibonacci; [f(n+3)+3*f(n+1)-4 for n in (0..40)] # G. C. Greubel, Jul 22 2019
    

Formula

From Colin Barker, May 07 2012: (Start)
a(n) = 2*a(n-1) - a(n-3).
G.f.: (1+3*x^2)/((1-x)*(1-x-x^2)). (End)
a(n) = Fibonacci(n+3) + 3*Fibonacci(n+1) - 4. - G. C. Greubel, Jul 22 2019