OFFSET
1,4
COMMENTS
a(n) = ror(n) XOR rol(n), where ror(x)=A038572(x) is x rotated one binary place to the right, rol(x)=A006257(x) is x rotated one binary place to the left, and XOR is the binary exclusive-or operator. - Alex Ratushnyak, May 24 2016
Numbers returned by the following function: take the t binary digits of n, d(1)..d(t), and replace each with the sum d(i) = (d(i-1) + d(i+1)) mod 2, where (i-1 = 0) maps to t and (i+1 > t) maps to 1.
LINKS
Anthony Sand, Table of n, a(n) for n = 1..1000
FORMULA
for digits d(1)..d(t), d(i) = (d(i-1) + d(i+1)) mod 2, where (i-1 = 0) -> t, (i+1 > t) -> 1.
EXAMPLE
For 1, the function returns d(1) = (d(1) + d(1)) mod 2 = (1 + 1) mod 2 = 0.
For 5, the initial digits are (1,0,1).
d(1) = (d(3) + d(2)) mod 2 = (1 + 0) mod 2 = 1; d(2) = (d(1) + d(3)) mod 2 = (1 + 1) mod 2 = 0; d(3) = (d(2) + d(1)) mod 2 = (0 + 1) mod 2 = 1.
The function returns (1,0,1) = 101 = 5 in base 10.
PROG
CROSSREFS
KEYWORD
AUTHOR
Anthony Sand, Jun 07 2014
STATUS
approved
