A061084 Fibonacci-type sequence based on subtraction: a(0) = 1, a(1) = 2 and a(n) = a(n-2) - a(n-1).
1, 2, -1, 3, -4, 7, -11, 18, -29, 47, -76, 123, -199, 322, -521, 843, -1364, 2207, -3571, 5778, -9349, 15127, -24476, 39603, -64079, 103682, -167761, 271443, -439204, 710647, -1149851, 1860498, -3010349, 4870847, -7881196, 12752043, -20633239, 33385282, -54018521
Offset: 0
Examples
a(6) = a(4)-a(5) = -4 - 7 = -11.
Links
- Indranil Ghosh, Table of n, a(n) for n = 0..4771 (terms 0..500 from T. D. Noe)
- Tanya Khovanova, Recursive Sequences
- Kai Wang, Fibonacci Numbers And Trigonometric Functions Outline, (2019).
- Q. Wang, On generalized Lucas sequences, Contemp. Math. 531 (2010) 127-141, Table 2 (k=2).
- Wikipedia, Lucas sequence
- Index entries for linear recurrences with constant coefficients, signature (-1,1).
- Index entries for Lucas sequences
Crossrefs
Programs
-
Haskell
a061084 n = a061084_list !! n a061084_list = 1 : 2 : zipWith (-) a061084_list (tail a061084_list) -- Reinhard Zumkeller, Feb 01 2014
-
Magma
A061084:= func< n | Lucas(1-n) >; // G. C. Greubel, Jun 14 2025
-
Mathematica
LinearRecurrence[{-1,1},{1,2},40] (* Harvey P. Dale, Nov 22 2011 *) LucasL[1-Range[0, 40]] (* G. C. Greubel, Jun 14 2025 *)
-
PARI
a(n)=([0,1; 1,-1]^n*[1;2])[1,1] \\ Charles R Greathouse IV, Feb 09 2017
-
SageMath
def A061084(n): return lucas_number2(1-n,1,-1) # G. C. Greubel, Jun 14 2025
Formula
a(n) = (-1)^(n-1) * A000204(n-1).
O.g.f.: (1+3*x)/(1+x-x^2). - Len Smiley, Dec 02 2001
From G. C. Greubel, Jun 14 2025: (Start)
a(n) = A000032(1-n).
E.g.f.: exp(-x/2)*( cosh(p*x) + sqrt(5)*sinh(p*x) ), where p = sqrt(5)/2. (End)
Extensions
Corrected by T. D. Noe, Oct 25 2006
Comments