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.

Showing 1-2 of 2 results.

A056503 Number of periodic palindromic structures of length n using a maximum of two different symbols.

Original entry on oeis.org

1, 2, 2, 4, 4, 7, 8, 14, 16, 26, 32, 51, 64, 100, 128, 198, 256, 392, 512, 778, 1024, 1552, 2048, 3091, 4096, 6176, 8192, 12324, 16384, 24640, 32768, 49222, 65536, 98432, 131072, 196744, 262144, 393472, 524288, 786698, 1048576, 1573376, 2097152, 3146256, 4194304
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.
A periodic palindrome is just a necklace that is equivalent to its reverse. The number of binary periodic palindromes of length n is given by A164090(n). A binary periodic palindrome can only be equivalent to its complement when there are an equal number of 0's and 1's. - Andrew Howroyd, Sep 29 2017
Number of cyclic compositions (necklaces of positive integers) summing to n that can be rotated to form a palindrome. - Gus Wiseman, Sep 16 2018

Examples

			From _Gus Wiseman_, Sep 16 2018: (Start)
The sequence of palindromic cyclic compositions begins:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (111)  (22)    (113)    (33)      (115)
                    (112)   (122)    (114)     (133)
                    (1111)  (11111)  (222)     (223)
                                     (1122)    (11113)
                                     (11112)   (11212)
                                     (111111)  (11122)
                                               (1111111)
(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

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_?OddQ] := b[n]/2; a[n_?EvenQ] := (1/2)*(b[n] + c[n/2]);
    Array[a, 45] (* Jean-François Alcover, Oct 08 2017, after Andrew Howroyd *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Function[q,And[Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And],Array[SameQ[RotateRight[q,#],Reverse[RotateRight[q,#]]]&,Length[q],1,Or]]]]],{n,15}] (* Gus Wiseman, Sep 16 2018 *)

Formula

a(2n+1) = A164090(2n+1)/2 = 2^n, a(2n) = (A164090(2n) + A045674(n))/2. - Andrew Howroyd, Sep 29 2017

Extensions

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

A180918 'DPE(n,k)' triangle read by rows. DPE(n,k) is the number of k-double-palindromes of n up to cyclic equivalence.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 2, 2, 1, 1, 0, 3, 2, 3, 1, 1, 0, 3, 3, 3, 3, 1, 1, 0, 4, 3, 6, 3, 4, 1, 1, 0, 4, 4, 6, 6, 4, 4, 1, 1, 0, 5, 4, 10, 6, 10, 4, 5, 1, 1, 0, 5, 5, 10, 10, 10, 10, 5, 5, 1, 1, 0, 6, 5, 15, 10, 20, 10, 15, 5, 6, 1, 1, 0, 6, 6, 15, 15, 20, 20, 15, 15, 6, 6, 1, 1
Offset: 1

Views

Author

John P. McSorley, Sep 23 2010

Keywords

Comments

A k-composition of n is an ordered collection of k positive integers (parts) which sum to n. Two k-compositions of n are cyclically equivalent if one can be obtained from the other by a cyclic permutation of its parts.
A palindrome is a word which is the same when written backwards.
A k-double-palindrome of n is a k-composition of n which is the concatenation of two palindromes, PP'=P|P', where both |P|, |P'|>=1.
See sequence A180653. For example 1123532=11|23532 is a 7-double-palindrome of 17 since both 11 and 23532 are palindromes.
Let DPE(n,k) denote the number of k-double-palindromes of n up to cyclic equivalence.
This sequence is the 'DPE(n,k)' triangle read by rows.

Examples

			The triangle begins:
  0
  0 1
  0 1 1
  0 2 1 1
  0 2 2 1 1
  0 3 2 3 1 1
  0 3 3 3 3 1 1
  0 4 3 6 3 4 1 1
  0 4 4 6 6 4 4 1 1
  0 5 4 10 6 10 4 5 1 1
  ...
For example, row 8 is: 0 4 3 6 3 4 1 1.
We have DPE(8,3)=3 because there are 3 3-double-palindromes of 8 up to cyclic equivalence: {116, 611}, {224, 422}, and {233, 332}.
We have DPE(8,4)=6 because there are 6 4-double-palindromes of 8: up to cyclic equivalence: {1115, 5111, 1511, 1151}, {1214, 4121, 1412, 2141}, {1133, 3311}, {1313, 3131}, {1232, 2123, 3212, 2321}, and {2222}.
		

References

  • John P. McSorley: Counting k-compositions of n with palindromic and related structures. Preprint, 2010.

Crossrefs

Row sums are A027383(n-1).
If we remove the cyclic equivalence requirement, and just count k-double-palindromes of n, then we get sequence A180653.
If we replace the left hand column of 0's by 1's in the triangle above, we get the triangle 'RE(n, k)' where RE(n, k) is the number of k-reverses of n up to cyclic equivalence, see the McSorley reference above for more details and also sequence A119963.
See sequence A179181 for the triangle whose (n, k) term gives the number of k-palindromes (single-palindromes) of n up to cyclic equivalence.

Programs

  • PARI
    T(n, k) = {if(k<=1, 0, binomial((n-k%2)\2, k\2))} \\ Andrew Howroyd, Sep 27 2019

Formula

T(n, 1) = 0; T(n, k) = A119963(n,k) for k > 1.

Extensions

Terms a(56) and beyond from Andrew Howroyd, Sep 27 2019
Showing 1-2 of 2 results.