login
a(n) = the (1,2)-entry in the matrix P^n + F^n, where the 2 X 2 matrices P and F are defined by P=[0,1;1,0] and F=[0,1;1,1].
0

%I #6 May 05 2021 10:01:05

%S 0,2,1,3,3,6,8,14,21,35,55,90,144,234,377,611,987,1598,2584,4182,6765,

%T 10947,17711,28658,46368,75026,121393,196419,317811,514230,832040,

%U 1346270,2178309,3524579,5702887,9227466,14930352,24157818,39088169

%N a(n) = the (1,2)-entry in the matrix P^n + F^n, where the 2 X 2 matrices P and F are defined by P=[0,1;1,0] and F=[0,1;1,1].

%F a(n) = A052959(n-1). - _R. J. Mathar_, Aug 18 2008

%e a(8)=21 because P^8=[1,0;0,1], F^8=[13,21;21,34] and so P^8+F^8=[14,21;21,34].

%p with(linalg): a:=proc(n) local P,F,v,k: P[1]:=matrix(2,2,[0,1,1,0]): F[1]:=matrix(2,2,[0,1,1,1]): v:=matrix(2,1,[0,1]): for k from 2 to n do P[k]:=multiply(P[1],P[k-1]): F[k]:=multiply(F[1],F[k-1]) od: evalm(P[n]+F[n])[1,2] end: 0,seq(a(n),n=1..44);

%t v[0] = {0, 1}; w[0] = {0, 1}; M2 = {{0, 1}, {1, 0}}; Mf = {{0, 1}, {1, 1}} v[n_] := v[n] = M2.v[n - 1] w[n_] := w[n] = Mf.w[n - 1] a = Table[(w[n] + v[n])[[1]], {n, 0, 50}]

%Y Cf. A000045.

%K nonn

%O 0,2

%A _Roger L. Bagula_, Jun 17 2005