OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-1)
FORMULA
From R. J. Mathar, Mar 11 2011: (Start)
a(n+1) - a(n) = A022087(n).
G.f.: ( 3-3*x+x^2 ) / ( (x-1)*(x^2+x-1) ). (End)
a(n) = 4*Fibonacci(n+1) - 1. - G. C. Greubel, Mar 01 2018
a(n) = (-1 + (2^(1-n)*(-(1-sqrt(5))^(1+n) + (1+sqrt(5))^(1+n))) / sqrt(5)). - Colin Barker, Mar 02 2018
MATHEMATICA
Table[4*Fibonacci[n+1] -1, {n, 0, 31}] (* Vladimir Joseph Stephan Orlovsky, Apr 03 2011 *)
RecurrenceTable[{a[0]==a[1]==3, a[n]==a[n-1]+a[n-2]+1}, a, {n, 40}] (* or *) LinearRecurrence[{2, 0, -1}, {3, 3, 7}, 50] (* Harvey P. Dale, Jan 10 2021 *)
PROG
(PARI) for(n=0, 40, print1(4*fibonacci(n+1) -1, ", ")) \\ G. C. Greubel, Mar 01 2018
(Magma) [4*Fibonacci(n+1) - 1: n in [0..40]]; // G. C. Greubel, Mar 01 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Terms a(32) onward added by G. C. Greubel, Mar 01 2018
STATUS
approved