OFFSET
0,3
COMMENTS
A palindrome is a block that reads the same forwards and backwards.
LINKS
Kevin Ryde, Table of n, a(n) for n = 0..10000
Jean Berstel, Luc Boasson, Olivier Carton, and Isabelle Fagnot, Infinite words without palindrome, arXiv:0903.2382 [cs.DM], March 13 2009, section 2 word "x".
FORMULA
Generated by iterating the morphism 0->01, 1->23, 2->45, 3->23, 4->01, 5->67, 6->45, 7->67, followed by coding 0->0, 1->1, 2->2, 3->3, 4->1, 5->0, 6->3, 7->2.
a(n) = (n mod 4) XOR A014707(floor(n/2)), using bitwise XOR, by noting the morphism before coding is (n mod 4) + 4*A014707(floor(n/2)). - Kevin Ryde, Apr 26 2024
PROG
(PARI) a(n) = bitxor(bitand(n, 3), bittest(n, valuation(n>>1+1, 2)+2)); \\ Kevin Ryde, Apr 26 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jeffrey Shallit, Apr 24 2024
STATUS
approved