%I #31 Feb 16 2025 08:33:12
%S 0,1,5,12,55,124,565,1268,5775,12956,59005,132372,602855,1352444,
%T 6159365,13817908,62930175,141177436,642957005,1442408532,6569085655,
%U 14737074364,67116286165,150568549748,685726462575,1538357452316
%N a(n) = 11*a(n-2) - 8*a(n-4), starting a(0)=0, a(1)=1, a(2)=5, a(3)=12.
%C The limiting ratio a(n)/a(n-1) alternates between 2.2433981132057377... and 4.554247641507091...
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SymplecticGroup.html">Symplectic Group</a>.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,11,0,-8).
%F Given the four matrices m(1) = {{1, 0}, {0, 1}}, m(2) = {{1, 1}, {0, 1}}, m(3) = {{1, 0}, {1, 1}}, and m(4) = m(1)+m(2)+m(3), repeatedly multiply the vector {0,1} with m(1), m(2) etc in a round-robin periodic fashion. a(n) is the top value of the vector after each second multiplication.
%F G.f.: x*(1 + 5*x + x^2) / (1 - 11*x^2 + 8*x^4). - _R. J. Mathar_, Feb 10 2011
%F a(n) = 5*a(n-1) - a(n-2) if n is even. a(n) = 4*a(n-1) - 8*a(n-2) if n is odd. - _R. J. Mathar_, Jun 18 2014
%e Multiplication with m1 updates the vector to {1,1}, then with m2 to {5,7}, then with m3 to {5,7}, then with m4 to {12,7}, then with m1 {12,19}, then with m2 {55,69}, ... The leading components are 1, 1, 5, 5, 12, 12, 55, 55, ... and each second defines the sequence.
%p with(LinearAlgebra) ; Am := [ [1,0,0,1], [1,1,0,1],[1,0,1,1],[3,1,1,3] ]: v := Vector[column](2,[0,1]) :
%p for l from 0 to 10 do
%p A := Matrix(2,2,op(1+(l mod 4),Am) ) ; v := A.v;
%p if type(l,'even') then print(v[1]) ; end if;
%p end do: # _R. J. Mathar_, Feb 10 2011
%t a[1] = {{1, 0}, {0, 1}};
%t a[2] = {{1, 1}, {0, 1}};
%t a[3] = {{1, 0}, {1, 1}};
%t a[4] = a[1] + a[2] + a[3]
%t v[0] = {0, 1};
%t v[n_] := v[n] = a[1 + Mod[n, 4]].v[n - 1]
%t Table[v[n][[1]], {n, 0, 60, 2}]
%K nonn,easy,changed
%O 0,3
%A _Roger L. Bagula_, Aug 05 2010