A143332 Related to Gray code representation of Fibonacci(n) in base 10.
0, 1, 1, 3, 2, 7, 12, 11, 31, 51, 44, 117, 216, 157, 453, 851, 566, 803, 788, 127, 859, 931, 440, 521, 432, 409, 809, 739, 458, 239, 828, 947, 391, 531, 148, 173, 360, 837, 61, 1011, 942, 475, 36, 375, 307, 579, 496, 145, 864, 689, 465
Offset: 0
Programs
-
Mathematica
GrayCodeList[k_] := Module[{b = IntegerDigits[k, 2], i}, Do[ If[b[[i - 1]] == 1, b[[i]] = 1 - b[[i]]], {i, Length[b], 2, -1} ]; b ]; FromGrayCodeList[d_] := Module[{b = d, i, j}, Do[ If[Mod[Sum[b[[j]], {j, i - 1}], 2] == 1, b[[i]] = 1 - b[[i]]], {i, n = Length[d], 2, -1} ]; FromDigits[b, 2] ]; GrayCode[i_, n_] :=
Extensions
Edited by M. F. Hasler, Mar 11 2015
Comments