login
Fibonacci sequence beginning 12, 7.
1

%I #23 Sep 08 2022 08:46:01

%S 12,7,19,26,45,71,116,187,303,490,793,1283,2076,3359,5435,8794,14229,

%T 23023,37252,60275,97527,157802,255329,413131,668460,1081591,1750051,

%U 2831642,4581693,7413335,11995028,19408363,31403391,50811754,82215145,133026899,215242044

%N Fibonacci sequence beginning 12, 7.

%H Vincenzo Librandi, <a href="/A206423/b206423.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,1).

%F From _Andrew Howroyd_, Aug 28 2018: (Start)

%F a(n) = a(n-1) + a(n-2) for n > 2.

%F a(n) = 12*Fibonacci(n) - 5*Fibonacci(n-1).

%F G.f.: x*(12 - 5*x)/(1 - x - x^2).

%F (End)

%t LinearRecurrence[{1,1},{12,7},60]

%o (Magma) I:=[12, 7]; [n le 2 select I[n] else Self(n-1)+Self(n-2): n in [1..40]]; \\ _Vincenzo Librandi_, Feb 17 2012

%o (PARI) Vec((12 - 5*x)/(1 - x - x^2) + O(x^30)) \\ _Andrew Howroyd_, Aug 28 2018

%o (Python)

%o alst, terms = [12, 7], 37

%o [alst.append(alst[n-1] + alst[n-2]) for n in range(2, terms)]

%o print(alst) # _Michael S. Branicky_, Dec 07 2021

%Y Cf. A000045.

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Feb 07 2012