OFFSET
0,2
COMMENTS
Row sums of A098599.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Aleksandar Petojević, Marjana Gorjanac Ranitović, Dragan Rastovac, and Milinko Mandić, The Golden Ratio, Factorials, and the Lambert W Function, Journal of Integer Sequences, Vol. 27 (2024), Article 24.5.7. See p. 4.
Index entries for linear recurrences with constant coefficients, signature (0,2,1).
FORMULA
G.f.: (1+2*x) / ((1+x)*(1-x-x^2)).
a(n) = Sum_{k = 0..n} binomial(k, n-k) + binomial(k-1, n-k-1).
a(n) = Lucas(n) - (-1)^n. - Paul Barry, Dec 01 2004
a(n) = A181716(n+1). - Richard R. Forberg, Aug 30 2014
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
From Colin Barker, Jun 03 2016: (Start)
a(n) = (-(-1)^n + ((1/2)*(1-sqrt(5)))^n + ((1/2)*(1+sqrt(5)))^n).
a(n) = 2*a(n-2) + a(n-3) for n > 2. (End)
E.g.f.: (2*exp(3*x/2)*cosh(sqrt(5)*x/2) - 1)*exp(-x). - Ilya Gutkovskiy, Jun 03 2016
MATHEMATICA
Table[-(-1)^n + LucasL[n], {n, 0, 39}] (* Alonso del Arte, Aug 30 2014 *)
Table[Fibonacci[n - 1] + Fibonacci[n + 1] - (-1)^n, {n, 0, 40}] (* Vincenzo Librandi, Aug 31 2014 *)
CoefficientList[ Series[-(1 + 2x)/(-1 + 2x^2 + x^3), {x, 0, 40}], x] (* or *)
LinearRecurrence[{0, 2, 1}, {1, 2, 2}, 40] (* Robert G. Wilson v, Mar 09 2018 *)
PROG
(Magma) [Fibonacci(n-1) + Fibonacci(n+1) - (-1)^n: n in [0..50]]: // Vincenzo Librandi, Aug 31 2014
(PARI) a(n)=fibonacci(n-1) + fibonacci(n+1) - (-1)^n; \\ Joerg Arndt, Oct 18 2014
(PARI) Vec((1+2*x)/((1+x)*(1-x-x^2)) + O(x^30)) \\ Colin Barker, Jun 03 2016
(SageMath) [lucas_number2(n, 1, -1) -(-1)^n for n in range(51)] # G. C. Greubel, Mar 26 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 17 2004
STATUS
approved