%I #40 Aug 27 2022 04:24:47
%S 1,3,18,54,324,972,5832,17496,104976,314928,1889568,5668704,34012224,
%T 102036672,612220032,1836660096,11019960576,33059881728,198359290368,
%U 595077871104,3570467226624,10711401679872,64268410079232,192805230237696
%N a(n) = 3*a(n-1) if n is odd, otherwise 6*a(n-1).
%C Let x(n) be the upper left element of the n-th power of the matrix M = N*H, where H =[1,1; 1,-1] is a Hadamard matrix. Then x(1)=N, and x(2k+1) = N*x(2k), and x(2k) = 2N*x(2k-1), for all k>0. More precisely, it is easy to see (using H^2=2I) that even powers of M equal x(n)*I, where I = identity matrix, and odd powers of M are again multiples of the Hadamard matrix H, M^n = x(n)*H.
%C Here, N = 3, M = [3,3; 3,-3], M^4 = [324,0; 0,324] = a(4)*I with a(4) = 324, and H^3 = [54,54; 54,-54] = a(3)*H with a(3)=54.
%C This sequence is closely associated with (3+3*i)^n. (3+3*i)^n = a(n)*[s(n+2)+s(n)*i], where s(n) is of period 8 repeating(0,1,1,1,0,-1,-1,-1)= round(sin(Pi*n/4)). In general (a+a*i)^n = f(a,n)*[s(n+2)+s(n)*i], where f(a,n) = 2^floor(n/2)*a^n. - _Gary Detlefs_, Aug 04 2013.
%D K. J. Horadam, Hadamard Matrices and Their Applications, Princeton University Press, 2006.
%H G. C. Greubel, <a href="/A130505/b130505.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,18).
%F a(0) = 1; a(n), n>0 = 3*a(n-1) if n is odd. a(n), n even = 6 * a(n-1). Upper left term in M^n where M = the 2 X 2 matrix [3, 3; 3, -3].
%F a(n) = 18*a(n-2). - _Charles R Greathouse IV_, Jan 10 2013
%F a(n) = (3+3*i)^n/(s(n+2)+s(n)*i), where s(n)= round(sin(Pi*n/4)). - _Gary Detlefs_, Aug 04 2013
%F From _Wolfdieter Lang_, Sep 06 2013: (Start)
%F O.g.f.: (1+3*x)/(1-2*(3*x)^2) (see the Ch. R. Greathouse IV comment).
%F a(2*k) = 18^k, a(2*k+1) = 3*18^k, k>=0. (From the partial fraction decomposition of the o.g.f.) (End)
%F Sum_{n>=0} 1/a(n) = 24/17. - _Amiram Eldar_, Aug 27 2022
%e a(3) = 54 = 3 * a(2) = 3 * 18.
%e a(4) = 324 = 6 * a(3) = 6 * 54.
%t CoefficientList[Series[(1 + 3*x)/(1 - 2*(3*x)^2), {x, 0, 50}], x] (* _G. C. Greubel_, Apr 17 2017 *)
%o (PARI) a(n)=18^(n\2)*if(n%2,3,1) \\ _Charles R Greathouse IV_, Jan 10 2013
%o (PARI) a(n)=([3,3; 3,-3]^n)[1,1] \\ _Charles R Greathouse IV_, Jan 10 2013
%K nonn,easy
%O 0,2
%A _Gary W. Adamson_, Jun 01 2007
%E Comment edited by _Charles R Greathouse IV_ and _M. F. Hasler_, Jan 13 2013
|