login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A032120 Number of reversible strings with n beads of 3 colors. 8
3, 6, 18, 45, 135, 378, 1134, 3321, 9963, 29646, 88938, 266085, 798255, 2392578, 7177734, 21526641, 64579923, 193720086, 581160258, 1743421725, 5230265175, 15690618378, 47071855134, 141215033961, 423645101883 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

"BIK" (reversible, indistinct, unlabeled) transform of 3, 0, 0, 0, ...

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

C. G. Bower, Transforms (2)

Index entries for linear recurrences with constant coefficients, signature (3,3,-9).

FORMULA

a(n) = (1/2)*((2-(-1)^n)*3^floor(n/2) + 3^n). - Ralf Stephan, May 11 2004

Equals 3 * A001444. - N. J. A. Sloane, Sep 22 2004

From Colin Barker, Apr 02 2012: (Start)

a(n) = 3*a(n-1) + 3*a(n-2) - 9*a(n-3).

G.f.: 3*x*(1-x-3*x^2)/((1-3*x)*(1-3*x^2)). (End)

a(n) = (1/2)*(3^(ceiling(n/2)) + 3^n). - Andrew Howroyd, Oct 10 2017

MATHEMATICA

f[n_] := If[EvenQ[n], (3^n + 3^(n/2))/2, (3^n + 3^Ceiling[n/2])/2];

Table[f[n], {n, 1, 25}] (* Geoffrey Critzer, Apr 24 2011 *)

CoefficientList[Series[3*(1-x-3*x^2)/((1-3*x)*(1-3*x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 22 2012 *)

Table[(1/2) ((2 - (-1)^n) 3^Floor[n/2] + 3^n), {n, 25}]. (* Bruno Berselli, Apr 22 2012 *)

PROG

(MAGMA) I:=[3, 6, 18]; [n le 3 select I[n] else 3*Self(n-1)+3*Self(n-2)-9*Self(n-3):  n in [1..25]]; // Vincenzo Librandi, Apr 22 2012

(PARI) a(n) = (3^n + 3^(ceil(n/2)))/2; \\ Andrew Howroyd, Oct 10 2017

CROSSREFS

Column 3 of A277504.

Sequence in context: A197050 A121188 A120718 * A115344 A223044 A289587

Adjacent sequences:  A032117 A032118 A032119 * A032121 A032122 A032123

KEYWORD

nonn,easy

AUTHOR

Christian G. Bower

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 20 21:53 EST 2018. Contains 299387 sequences. (Running on oeis4.)