A056488 Number of periodic palindromes using a maximum of six different symbols.
6, 21, 36, 126, 216, 756, 1296, 4536, 7776, 27216, 46656, 163296, 279936, 979776, 1679616, 5878656, 10077696, 35271936, 60466176, 211631616, 362797056, 1269789696, 2176782336, 7618738176, 13060694016, 45712429056, 78364164096, 274274574336, 470184984576
Offset: 1
Examples
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.
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).
Programs
-
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
-
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 *)
-
PARI
a(n) = if(n%2, 6^((n+1)/2), 7*6^(n/2)/2); \\ Altug Alkan, Sep 21 2018
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
Extensions
More terms from Vincenzo Librandi, Sep 22 2018
Comments