OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (3,-2,-1,1).
FORMULA
G.f.: (1-x+4*x^2-3*x^3)/((1-x-x^2)*(1-x)^2).
a(n) = 3*Fibonacci(n+1)+2*Fibonacci(n+3)-n-6. - Vaclav Kotesovec, May 13 2012
a(n) = 2*Lucas(n+2) + Fibonacci(n+1) - (n+6). - G. C. Greubel, Jul 09 2019
MATHEMATICA
Table[3*Fibonacci[n+1]+2*Fibonacci[n+3]-n-6, {n, 0, 40}] (* Vaclav Kotesovec, May 13 2012 *)
PROG
(Python)
prpr, prev = 1, 2
for n in range(2, 99):
current = prev+prpr+n+3
print(prpr, end=', ')
prpr = prev
prev = current
(Magma) [3*Fibonacci(n+1)+2*Fibonacci(n+3)-n-6: n in [0..40]]; // Vincenzo Librandi, Jul 18 2013
(PARI) vector(40, n, n--; f=fibonacci; 2*f(n+3)+3*f(n+1)-n-6) \\ G. C. Greubel, Jul 09 2019
(Sage) f=fibonacci; [2*f(n+3)+3*f(n+1)-n-6 for n in (0..40)] # G. C. Greubel, Jul 09 2019
(GAP) F:=Fibonacci;; List([0..40], n-> 2*F(n+3)+3*F(n+1)-n-6); # G. C. Greubel, Jul 09 2019
CROSSREFS
Cf. A065220: a(n)=a(n-1)+a(n-2)+n-5, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A168043: a(n)=a(n-1)+a(n-2)+n-3, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A131269: a(n)=a(n-1)+a(n-2)+n-2, a(0)=1,a(1)=2.
Cf. A000126: a(n)=a(n-1)+a(n-2)+n-1, a(0)=1,a(1)=2.
Cf. A104161: a(n)=a(n-1)+a(n-2)+n, a(0)=1,a(1)=2 (except the first term).
Cf. A192969: a(n)=a(n-1)+a(n-2)+n+1, a(0)=1,a(1)=2.
Cf. A210728: a(n)=a(n-1)+a(n-2)+n+2, a(0)=1,a(1)=2.
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, May 10 2012
STATUS
approved