|
|
A372257
|
|
An infinite sequence over {0,1,2,3} without palindromes of length more than 1.
|
|
2
|
|
|
0, 1, 2, 3, 1, 0, 2, 3, 0, 1, 3, 2, 1, 0, 2, 3, 0, 1, 2, 3, 1, 0, 3, 2, 0, 1, 3, 2, 1, 0, 2, 3, 0, 1, 2, 3, 1, 0, 2, 3, 0, 1, 3, 2, 1, 0, 3, 2, 0, 1, 2, 3, 1, 0, 3, 2, 0, 1, 3, 2, 1, 0, 2, 3, 0, 1, 2, 3, 1, 0, 2, 3, 0, 1, 3, 2, 1, 0, 2, 3, 0, 1, 2, 3, 1, 0, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
A palindrome is a block that reads the same forwards and backwards.
|
|
LINKS
|
|
|
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,changed
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|