OFFSET
1,2
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
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]
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
FORMULA
a(2n+1) = A164090(2n+1)/2 = 2^n, a(2n) = (A164090(2n) + A045674(n))/2. - Andrew Howroyd, Sep 29 2017
EXAMPLE
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)
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(17)-a(45) from Andrew Howroyd, Apr 07 2017
STATUS
approved