|
|
A163543
|
|
The relative direction (0=straight ahead, 1=turn right, 2=turn left) taken by the type I Hilbert's Hamiltonian walk A163359 at the step n.
|
|
4
|
|
|
2, 2, 1, 0, 1, 1, 2, 2, 1, 1, 0, 1, 2, 2, 0, 2, 1, 1, 2, 0, 2, 2, 1, 1, 2, 2, 0, 2, 1, 1, 0, 0, 1, 1, 2, 0, 2, 2, 1, 1, 2, 2, 0, 2, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 2, 1, 1, 0, 1, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 1, 2, 2, 0, 2, 1, 1, 0, 1, 2, 2, 1, 0, 1, 1, 2, 2, 1, 1, 0, 1, 2, 2, 0, 0, 2, 2, 1, 0, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(16*n) = a(256*n) for all n.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
HC = {
L[n_ /; IntegerQ[n/2]] :> {F[n], L[n], L[n + 1], R[n + 2]},
R[n_ /; IntegerQ[(n + 1)/2]] :> {F[n], R[n], R[n + 3], L[n + 2]},
R[n_ /; IntegerQ[n/2]] :> {L[n], R[n + 1], R[n], F[n + 3]},
L[n_ /; IntegerQ[(n + 1)/2]] :> {R[n], L[n + 3], L[n], F[n + 1]},
F[n_ /; IntegerQ[n/2]] :> {L[n], R[n + 1], R[n], L[n + 3]},
F[n_ /; IntegerQ[(n + 1)/2]] :> {R[n], L[n + 3], L[n], R[n + 1]}};
a[1] = F[0]; Map[(a[n_ /; IntegerQ[(n - #)/16] ] := Part[Flatten[a[(n + 16 - #)/16] /. HC /. HC], #]) &, Range[16]];
Part[a[#] & /@ Range[4^4] /. {L[_] -> 2, R[_] -> 1, F[_] -> 0}, 2 ;; -1] (* Bradley Klee, Aug 06 2015 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|