%I #88 Jun 19 2024 02:05:16
%S 1,2,2,5,6,12,17,30,46,77,122,200,321,522,842,1365,2206,3572,5777,
%T 9350,15126,24477,39602,64080,103681,167762,271442,439205,710646,
%U 1149852,1860497,3010350,4870846,7881197,12752042,20633240,33385281,54018522
%N a(n) = Fibonacci(n-1) + Fibonacci(n+1) - (-1)^n.
%C Row sums of A098599.
%H Vincenzo Librandi, <a href="/A098600/b098600.txt">Table of n, a(n) for n = 0..1000</a>
%H Aleksandar Petojević, Marjana Gorjanac Ranitović, Dragan Rastovac, and Milinko Mandić, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL27/Petojevic/peto5.html">The Golden Ratio, Factorials, and the Lambert W Function</a>, Journal of Integer Sequences, Vol. 27 (2024), Article 24.5.7. See p. 4.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,1).
%F G.f.: (1+2*x) / ((1+x)*(1-x-x^2)).
%F a(n) = Sum_{k = 0..n} binomial(k, n-k) + binomial(k-1, n-k-1).
%F a(n) = A020878(n) - 1 = A001350(n) + 1.
%F a(n) = Lucas(n) - (-1)^n. - _Paul Barry_, Dec 01 2004
%F a(n) = A181716(n+1). - _Richard R. Forberg_, Aug 30 2014
%F a(n) = [x^n] ( (1 + x + sqrt(1 + 6*x + 5*x^2))/2 )^n. exp( Sum_{n >= 1} a(n)*x^n/n ) = Sum_{n >= 0} Fibonacci(n+2)*x^n. Cf. A182143. - _Peter Bala_, Jun 29 2015
%F From _Colin Barker_, Jun 03 2016: (Start)
%F a(n) = (-(-1)^n + ((1/2)*(1-sqrt(5)))^n + ((1/2)*(1+sqrt(5)))^n).
%F a(n) = 2*a(n-2) + a(n-3) for n > 2. (End)
%F E.g.f.: (2*exp(3*x/2)*cosh(sqrt(5)*x/2) - 1)*exp(-x). - _Ilya Gutkovskiy_, Jun 03 2016
%F a(n) = A014217(n) + A000035(n). - _Paul Curtz_, Jul 27 2023
%t Table[-(-1)^n + LucasL[n], {n, 0, 39}] (* _Alonso del Arte_, Aug 30 2014 *)
%t Table[Fibonacci[n - 1] + Fibonacci[n + 1] - (-1)^n, {n, 0, 40}] (* _Vincenzo Librandi_, Aug 31 2014 *)
%t CoefficientList[ Series[-(1 + 2x)/(-1 + 2x^2 + x^3), {x, 0, 40}], x] (* or *)
%t LinearRecurrence[{0, 2, 1}, {1, 2, 2}, 40] (* _Robert G. Wilson v_, Mar 09 2018 *)
%o (Magma) [Fibonacci(n-1) + Fibonacci(n+1) - (-1)^n: n in [0..50]]: // _Vincenzo Librandi_, Aug 31 2014
%o (PARI) a(n)=fibonacci(n-1) + fibonacci(n+1) - (-1)^n; \\ _Joerg Arndt_, Oct 18 2014
%o (PARI) Vec((1+2*x)/((1+x)*(1-x-x^2)) + O(x^30)) \\ _Colin Barker_, Jun 03 2016
%o (SageMath) [lucas_number2(n,1,-1) -(-1)^n for n in range(51)] # _G. C. Greubel_, Mar 26 2024
%Y Cf. A000032, A000035, A000045, A001350, A008346.
%Y Cf. A020878, A098599, A099925, A181716, A182143.
%Y First differences of A014217 and A062724.
%K easy,nonn
%O 0,2
%A _Paul Barry_, Sep 17 2004