%I #58 Sep 08 2022 08:45:01
%S 1,4,4,16,16,64,64,256,256,1024,1024,4096,4096,16384,16384,65536,
%T 65536,262144,262144,1048576,1048576,4194304,4194304,16777216,
%U 16777216,67108864,67108864,268435456,268435456,1073741824,1073741824,4294967296
%N a(n) = (3*2^n - (-2)^n)/2.
%C Number of palindromes of length n using a maximum of four different symbols.
%C Number of achiral rows of n colors using up to four colors. - _Robert A. Russell_, Nov 09 2018
%C Interleaving of A000302 and 4*A000302.
%C Unsigned version of A141125.
%C Binomial transform is A164907. Second binomial transform is A164908. Third binomial transform is A057651. Fourth binomial transform is A016129.
%D M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]
%H Vincenzo Librandi, <a href="/A056450/b056450.txt">Table of n, a(n) for n = 0..2000</a>
%H <a href="/index/Di#divseq">Index to divisibility sequences</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,4).
%F a(n) = 4^floor((n+1)/2).
%F a(n) = 4*a(n-2) for n > 1; a(0) = 1, a(1) = 4.
%F G.f.: (1+4*x) / (1-4*x^2). - _R. J. Mathar_, Jan 19 2011 [Adapted to offset 0 by _Robert A. Russell_, Nov 07 2018]
%F a(n+3) = a(n+2)*a(n+1)/a(n). - _Reinhard Zumkeller_, Mar 04 2011
%F a(n) = 4*abs(A164111(n-1)). - _R. J. Mathar_, Jan 19 2011
%F a(n) = C(4,0)*A000007(n) + C(4,1)*A057427(n) + C(4,2)*A056453(n) + C(4,3)*A056454(n) + C(4,4)*A056455(n). - _Robert A. Russell_, Nov 08 2018
%e At length n=1 there are a(1)=4 palindromes, A, B, C, D.
%e At length n=2, there are a(2)=4 palindromes, AA, BB, CC, DD.
%e At length n=3, there are a(3)=16 palindromes, AAA, BBB, CCC, DDD, ABA, BAB, ... , CDC, DCD.
%t Table[4^Ceiling[n/2], {n,0,40}] (* or *)
%t CoefficientList[Series[(1 + 4 x)/((1 + 2 x) (1 - 2 x)), {x, 0, 31}], x] (* or *)
%t LinearRecurrence[{0, 4}, {1, 4}, 40] (* _Robert A. Russell_, Nov 07 2018 *)
%o (Magma) [ (3*2^n-(-2)^n)/2: n in [0..31] ];
%o (Magma) [4^Floor((n+1)/2): n in [0..40]]; // _Vincenzo Librandi_, Aug 16 2011
%o (PARI) a(n)=4^((n+1)\2) \\ _Charles R Greathouse IV_, Apr 08 2012
%o (PARI) a(n)=(3*2^n-(-2)^n)/2 \\ _Charles R Greathouse IV_, Oct 03 2016
%Y Column k=4 of A321391.
%Y Cf. A000302 (powers of 4), A056450, A141125, A164907, A164908, A057651, A016129.
%Y Cf. A016116.
%Y Essentially the same as A213173.
%Y Cf. A000302 (oriented), A032121 (unoriented), A032087(n>1) (chiral).
%K nonn,easy
%O 0,2
%A _Marks R. Nester_
%E a(0)=1 prepended by _Robert A. Russell_, Nov 07 2018
%E Edited by _N. J. A. Sloane_, Sep 29 2019