cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Crossrefs

Column 3 of A293500 for n>1.
Cf. A032120.

Programs

  • Mathematica
    Join[{3}, LinearRecurrence[{3, 3, -9}, {3, 9, 36}, 24]] (* Jean-François Alcover, Oct 11 2017 *)
  • PARI
    a(n) = if(n<2, [3][n], (3^n - 3^(ceil(n/2)))/2); \\ Andrew Howroyd, Oct 10 2017

Formula

"BHK" (reversible, identity, unlabeled) transform of 3, 0, 0, 0, ...
Conjectures from Colin Barker, Apr 02 2012: (Start)
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)
Conjectures from Colin Barker, Mar 09 2017: (Start)
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
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