The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245582 Number of binary strings of length n having a cyclic shift that is a palindrome. 1
1, 2, 2, 8, 6, 32, 20, 100, 54, 260, 152, 684, 348, 1640, 884, 3728, 1974, 8672, 4556, 19420, 10056, 42736, 22508, 94164, 48636, 204632, 106472, 441764, 228444, 950216, 491120, 2031556, 1046454, 4323888, 2228192, 9174400, 4713252, 19398584 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Alternatively (Luke Schaeffer), those binary strings of length n that can be written as the concatenation of two palindromes, one of which has even length. - Jeffrey Shallit, Jan 28 2016
Apparently A045655 is a bisection. - R. J. Mathar, Mar 11 2017
LINKS
EXAMPLE
For n = 4 the function counts the strings 0000, 0011, 0110 and their bitwise complements.
MATHEMATICA
palQ[lst_] := lst==Reverse[lst]; a[n_] := (For[k=0; cnt=0, k<2^n, k++, bb = PadLeft[IntegerDigits[k, 2], n]; If[MatchQ[bb, {a___ /; palQ[{a}], b___ /; palQ[{b}]} /; EvenQ[Length[{a}]] || EvenQ[Length[{b}]]], cnt++]]; cnt); Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 25}] (* Jean-François Alcover, Jan 28 2016 *)
CROSSREFS
Sequence in context: A285114 A071418 A353268 * A361790 A197820 A064862
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Jul 26 2014
EXTENSIONS
a(25)-a(37) from Lars Blomberg, Oct 20 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 9 13:50 EDT 2024. Contains 373240 sequences. (Running on oeis4.)