OFFSET
1,1
COMMENTS
Also number of necklaces with n beads and 6 colors that are the same when turned over and hence have reflection symmetry. - Herbert Kociemba, Nov 24 2016
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 = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,6).
FORMULA
a(n) = 6^((n+1)/2) for n odd, a(n) = 6^(n/2)*7/2 for n even.
From Colin Barker, Jul 08 2012: (Start)
a(n) = 6*a(n-2).
G.f.: 3*x*(2+7*x)/(1-6*x^2). (End)
a(n) = (k^floor((n+1)/2) + k^ceiling((n+1)/2)) / 2, where k = 6 is the number of possible colors. - Robert A. Russell, Sep 22 2018
EXAMPLE
G.f. = 6*x + 21*x^2 + 36*x^3 + 126*x^4 + 216*x^5 + 756*x^6 + 1296*x^7 + ...
For example, aaabbb is not a (finite) palindrome but it is a periodic palindrome.
MATHEMATICA
LinearRecurrence[{0, 6}, {6, 21}, 30] (* Harvey P. Dale, Feb 02 2015 *)
k = 6; Table[(k^Floor[(n + 1)/2] + k^Ceiling[(n + 1)/2]) / 2, {n, 30}] (* Robert A. Russell, Sep 21 2018 *)
If[EvenQ[#], 6^(# / 2) 7/2, 6^((# + 1) / 2)]&/@Range[30] (* Vincenzo Librandi, Sep 22 2018 *)
PROG
(PARI) a(n) = if(n%2, 6^((n+1)/2), 7*6^(n/2)/2); \\ Altug Alkan, Sep 21 2018
(Magma) [IsEven(n) select 6^(n div 2)*7/2 else 6^((n+1) div 2): n in [1..30]]; // Vincenzo Librandi, Sep 22 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Vincenzo Librandi, Sep 22 2018
STATUS
approved