A066982 a(n) = Lucas(n+1) - (n+1).
1, 1, 3, 6, 12, 22, 39, 67, 113, 188, 310, 508, 829, 1349, 2191, 3554, 5760, 9330, 15107, 24455, 39581, 64056, 103658, 167736, 271417, 439177, 710619, 1149822, 1860468, 3010318, 4870815, 7881163, 12752009, 20633204, 33385246, 54018484, 87403765, 141422285
Offset: 1
Links
- Harry J. Smith, Table of n, a(n) for n = 1..250
- Index entries for linear recurrences with constant coefficients, signature (3,-2,-1,1).
Programs
-
GAP
List([1..40], n-> Lucas(1,-1,n+1)[2] -n-1); # G. C. Greubel, Jul 09 2019
-
Magma
[Lucas(n+1)-n-1: n in [1..40]]; // G. C. Greubel, Jul 09 2019
-
Mathematica
a[1]=a[2]=1; a[n_]:= a[n] = a[n-1] +a[n-2] +n-2; Table[a[n], {n, 40}] LinearRecurrence[{3, -2, -1, 1}, {1, 1, 3, 6}, 40] (* Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *) Table[LucasL[n+1]-n-1, {n, 40}] (* Vladimir Reshetnikov, Sep 15 2016 *) CoefficientList[Series[(1-2*x+2*x^2)/((1-x)^2*(1-x-x^2)), {x, 0, 40}], x] (* L. Edson Jeffery, Sep 28 2017 *)
-
PARI
vector(40, n, my(f=fibonacci); f(n+2)+f(n)-n-1) \\ G. C. Greubel, Jul 09 2019
-
Sage
[lucas_number2(n+1,1,-1) -n-1 for n in (1..40)] # G. C. Greubel, Jul 09 2019
Formula
a(1) = a(2) = 1, a(n + 2) = a(n + 1) + a(n) + n.
For n > 2, a(n) = floor(phi^(n+1) - (n+1)) + (1-(-1)^n)/2.
From Colin Barker, Jun 30 2012: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: x*(1-2*x+2*x^2)/((1-x)^2*(1-x-x^2)). (End)
a(n) is the sum of the n-th antidiagonal of A352744 (assuming offset 0). - Peter Luschny, Nov 16 2023
Extensions
Corrected and extended by Harvey P. Dale, Feb 08 2002
Comments