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.

A056489 Number of periodic palindromes using exactly three different symbols.

Original entry on oeis.org

0, 0, 0, 3, 6, 21, 36, 93, 150, 345, 540, 1173, 1806, 3801, 5796, 11973, 18150, 37065, 55980, 113493, 171006, 345081, 519156, 1044453, 1569750, 3151785, 4733820, 9492213, 14250606, 28550361, 42850116, 85798533, 128746950, 257690505, 386634060, 773661333
Offset: 1

Views

Author

Keywords

Comments

For example, aaabbb is not a (finite) palindrome but it is a periodic palindrome.

Examples

			For n=4, the three arrangements are ABAC, ABCB, and ACBC.
For n=5, the six arrangements are AABCB, AACBC, ABACC, ABBAC, ABCCB, and ACBBC.
		

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]

Crossrefs

Cf. A056454.
Column 3 of A305540.

Programs

  • GAP
    a:=[0,0,0,3,6];; for n in [6..40] do a[n]:=a[n-1]+5*a[n-2]-5*a[n-3]-6*a[n-4]+6*a[n-5]; od; a; # Muniru A Asiru, Sep 28 2018
  • Maple
    seq(coeff(series(3*x^4*(1+x)/((1-x)*(1-2*x^2)*(1-3*x^2)),x,n+1), x, n), n = 1..40); # Muniru A Asiru, Sep 28 2018
  • Mathematica
    k = 3; Table[(k!/2) (StirlingS2[Floor[(n + 1)/2], k] +
    StirlingS2[Ceiling[(n + 1)/2], k]), {n, 1, 40}] (* Robert A. Russell, Jun 05 2018 *)
    LinearRecurrence[{1, 5, -5, -6, 6}, {0, 0, 0, 3, 6}, 80] (* Vincenzo Librandi, Sep 27 2018 *)
  • PARI
    a(n) = my(k=3); (k!/2)*(stirling(floor((n+1)/2), k, 2) + stirling(ceil((n+1)/2), k, 2)); \\ Michel Marcus, Jun 05 2018
    

Formula

a(n) = 2 * A056343(n) - A056283(n).
G.f.: 3*x^4*(1+x)/((1-x)*(1-2*x^2)*(1-3*x^2)). - Colin Barker, May 06 2012
a(n) = (k!/2)*(S2(floor((n+1)/2),k) + S2(ceiling((n+1)/2),k)), with k=3 different colors used and where S2(n,k) is the Stirling subset number A008277. - Robert A. Russell, Jun 05 2018