login
Gray code base 4 applied to Hofstadter's(A005185 Hofstadter Q - sequence): a(n)=GrayCode[Hofstadter[n] - 1, 4].
0

%I #3 Feb 16 2025 08:33:09

%S 0,0,1,3,3,2,6,6,7,7,7,4,4,4,13,12,13,15,15,14,14,14,14,8,11,11,8,8,8,

%T 8,2,0,0,2,6,3,2,7,6,7,5,5,4,4,4,4,4,8,4,12,11,14,13,11,11,14,8,11,8,

%U 8,8,8,4,0,9,7,3,0,5,4,6,7,4,5,4,5,13,4,12,15,14,15,15,11,14,10,9,9,11,8,8

%N Gray code base 4 applied to Hofstadter's(A005185 Hofstadter Q - sequence): a(n)=GrayCode[Hofstadter[n] - 1, 4].

%D https://mathworld.wolfram.com/notebooks/Combinatorics/GrayCode.nb.

%F a(n)=GrayCode[Hofstadter[n] - 1, 4].

%t << DiscreteMath`CombinatorialFunctions` (* rather than put in the whole code :needs GrayCode.nb *) Table[GrayCode[Hofstadter[n] - 1, 4], {n, 100}]

%K nonn,changed

%O 1,4

%A _Roger L. Bagula_ and _Gary W. Adamson_, Nov 18 2008