|
|
A032086
|
|
Number of reversible strings with n beads of 3 colors. If more than 1 bead, not palindromic.
|
|
5
|
|
|
3, 3, 9, 36, 108, 351, 1053, 3240, 9720, 29403, 88209, 265356, 796068, 2390391, 7171173, 21520080, 64560240, 193700403, 581101209, 1743362676, 5230088028, 15690441231, 47071323693, 141214502520, 423643507560
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
"BHK" (reversible, identity, unlabeled) transform of 3, 0, 0, 0, ...
a(n) = 3*a(n-1) + 3*a(n-2) - 9*a(n-3) for n > 4.
G.f.: 3*x*(1 - 2*x - 3*x^2 + 9*x^3)/((1 - 3*x)*(1 - 3*x^2)).
(End)
a(n) = (2*3^n - 2*3^(n/2)) / 4 for n > 2 and even.
a(n) = (2*3^n - 2*3^((n+1)/2)) / 4 for n > 2 and odd.
(End)
The above conjectures are true: The second set follows from the definition and the first set can be derived from that. - Andrew Howroyd, Oct 10 2017
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) a(n) = if(n<2, [3][n], (3^n - 3^(ceil(n/2)))/2); \\ Andrew Howroyd, Oct 10 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|