%I #34 Sep 24 2024 14:52:58
%S 1,1,3,4,9,16,27,64,81,256,243,1024,729,4096,2187,16384,6561,65536,
%T 19683,262144,59049,1048576,177147,4194304,531441,16777216,1594323,
%U 67108864,4782969,268435456,14348907,1073741824,43046721,4294967296,129140163,17179869184
%N Powers of 3 alternating with powers of 4.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,7,0,-12).
%F a(n) = 7*a(n-2) - 12*a(n-4) for n >= 4.
%F From _Stefano Spezia_, Sep 06 2024: (Start)
%F G.f.: (1 + x - 4*x^2 - 3*x^3)/((1 - 2*x)*(1 + 2*x)*(1 - 3*x^2)).
%F a(n) = (4*3^(n/2)*A059841(n) - (-2)^n + 2^n)/4.
%F E.g.f.: cosh(sqrt(3)*x) + cosh(x)*sinh(x). (End)
%t seq[len_] := Module[{m = Ceiling[len/2] - 1}, Riffle @@ Map[#^Range[0, m] &, {3, 4}]]; seq[36] (* _Amiram Eldar_, Sep 05 2024 *)
%o (Python)
%o def A375966(n): return 1<<(n^1) if n&1 else 3**(n>>1) # _Chai Wah Wu_, Sep 24 2024
%Y Cf. A000244 and A000302 interleaved.
%Y Cf. A000035, A059841, A072345, A098293.
%K nonn,easy
%O 0,3
%A _Paul Curtz_, Sep 04 2024