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.

A056508 Number of periodic palindromic structures of length n using exactly two different symbols.

Original entry on oeis.org

0, 1, 1, 3, 3, 6, 7, 13, 15, 25, 31, 50, 63, 99, 127, 197, 255, 391, 511, 777, 1023, 1551, 2047, 3090, 4095, 6175, 8191, 12323, 16383, 24639, 32767, 49221, 65535, 98431, 131071, 196743, 262143, 393471, 524287, 786697, 1048575, 1573375, 2097151, 3146255, 4194303
Offset: 1

Views

Author

Keywords

Comments

For example, aaabbb is not a (finite) palindrome but it is a periodic palindrome. Permuting the symbols will not change the structure.
For odd n, a palindrome cannot be the complement of itself, so a(n) is given by A284855(n,2)/2 - 1. - Andrew Howroyd, Apr 08 2017

Examples

			From _Andrew Howroyd_, Apr 07 2017: (Start)
Example for n=6:
Periodic symmetry means results are either in the form abccba or abcdcb.
There are 3 binary words in the form abccba that start with 0 and contain a 1 which are 001100, 010010, 011110. Of these, 011110 is equivalent to 001100 after rotation.
There are 7 binary words in the form abcdcb that start with 0 and contain a 1 which are 000100, 001010, 001110, 010001, 010101, 011011, 011111. Of these, 011111 is equivalent to 000100, 010001 is equivalent to 001010 and 011011 is equivalent to 010010 from the first set.
There are therefore a total of 7 + 3 - 4 = 6 equivalence classes so a(6) = 6.
(End)
		

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

Column 2 of A285012.
Cf. A052551.

Programs

  • Mathematica
    (* b = A164090, c = A045674 *)
    b[n_] := (1/4)*(7 - (-1)^n)*2^((1/4)*(2*n + (-1)^n - 1));
    c[0] = 1;
    c[n_] := c[n] = If[EvenQ[n], 2^(n/2 - 1) + c[n/2], 2^((n - 1)/2)];
    a[n_] := If[OddQ[n], b[n]/2, (1/2)*(b[n] + c[n/2])] - 1;
    Array[a, 45] (* Jean-François Alcover, Jun 29 2018, after Andrew Howroyd *)

Formula

a(n) = A056503(n) - 1.
a(2n + 1) = 2^n - 1. - Andrew Howroyd, Apr 07 2017

Extensions

a(17)-a(45) from Andrew Howroyd, Apr 07 2017