login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of reversible strings with n beads of 3 colors. If more than 1 bead, not palindromic.
5

%I #40 Aug 06 2024 20:50:03

%S 3,3,9,36,108,351,1053,3240,9720,29403,88209,265356,796068,2390391,

%T 7171173,21520080,64560240,193700403,581101209,1743362676,5230088028,

%U 15690441231,47071323693,141214502520,423643507560

%N Number of reversible strings with n beads of 3 colors. If more than 1 bead, not palindromic.

%H Andrew Howroyd, <a href="/A032086/b032086.txt">Table of n, a(n) for n = 1..200</a>

%H C. G. Bower, <a href="/transforms2.html">Transforms (2)</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3, 3, -9).

%F "BHK" (reversible, identity, unlabeled) transform of 3, 0, 0, 0, ...

%F Conjectures from _Colin Barker_, Apr 02 2012: (Start)

%F a(n) = 3*a(n-1) + 3*a(n-2) - 9*a(n-3) for n > 4.

%F G.f.: 3*x*(1 - 2*x - 3*x^2 + 9*x^3)/((1 - 3*x)*(1 - 3*x^2)).

%F (End)

%F Conjectures from _Colin Barker_, Mar 09 2017: (Start)

%F a(n) = (2*3^n - 2*3^(n/2)) / 4 for n > 2 and even.

%F a(n) = (2*3^n - 2*3^((n+1)/2)) / 4 for n > 2 and odd.

%F (End)

%F 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

%F a(n) = (3^n - 3^(ceiling(n/2))) / 2 = (A000244(n) - A056449(n)) / 2 for n>1. - _Robert A. Russell_ and _Danny Rorabaugh_, Jun 22 2018

%t Join[{3}, LinearRecurrence[{3, 3, -9}, {3, 9, 36}, 24]] (* _Jean-François Alcover_, Oct 11 2017 *)

%o (PARI) a(n) = if(n<2, [3][n], (3^n - 3^(ceil(n/2)))/2); \\ _Andrew Howroyd_, Oct 10 2017

%Y Column 3 of A293500 for n>1.

%Y Cf. A032120.

%K nonn,easy

%O 1,1

%A _Christian G. Bower_