OFFSET
0,2
COMMENTS
Number of palindromes of length n using a maximum of four different symbols.
Number of achiral rows of n colors using up to four colors. - Robert A. Russell, Nov 09 2018
Unsigned version of A141125.
REFERENCES
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]
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..2000
Index entries for linear recurrences with constant coefficients, signature (0,4).
FORMULA
a(n) = 4^floor((n+1)/2).
a(n) = 4*a(n-2) for n > 1; a(0) = 1, a(1) = 4.
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]
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
a(n) = 4*abs(A164111(n-1)). - R. J. Mathar, Jan 19 2011
EXAMPLE
At length n=1 there are a(1)=4 palindromes, A, B, C, D.
At length n=2, there are a(2)=4 palindromes, AA, BB, CC, DD.
At length n=3, there are a(3)=16 palindromes, AAA, BBB, CCC, DDD, ABA, BAB, ... , CDC, DCD.
MATHEMATICA
Table[4^Ceiling[n/2], {n, 0, 40}] (* or *)
CoefficientList[Series[(1 + 4 x)/((1 + 2 x) (1 - 2 x)), {x, 0, 31}], x] (* or *)
LinearRecurrence[{0, 4}, {1, 4}, 40] (* Robert A. Russell, Nov 07 2018 *)
PROG
(Magma) [ (3*2^n-(-2)^n)/2: n in [0..31] ];
(Magma) [4^Floor((n+1)/2): n in [0..40]]; // Vincenzo Librandi, Aug 16 2011
(PARI) a(n)=4^((n+1)\2) \\ Charles R Greathouse IV, Apr 08 2012
(PARI) a(n)=(3*2^n-(-2)^n)/2 \\ Charles R Greathouse IV, Oct 03 2016
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
a(0)=1 prepended by Robert A. Russell, Nov 07 2018
Edited by N. J. A. Sloane, Sep 29 2019
STATUS
approved