login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A163541 The absolute direction (0=east, 1=south, 2=west, 3=north) taken by the type I Hilbert's Hamiltonian walk A163359 at the step n. 4
1, 0, 3, 0, 0, 1, 2, 1, 0, 1, 2, 2, 3, 2, 1, 1, 0, 1, 2, 1, 1, 0, 3, 0, 1, 0, 3, 3, 2, 3, 0, 0, 0, 1, 2, 1, 1, 0, 3, 0, 1, 0, 3, 3, 2, 3, 0, 3, 3, 2, 1, 2, 2, 3, 0, 3, 2, 3, 0, 0, 1, 0, 3, 0, 0, 1, 2, 1, 1, 0, 3, 0, 1, 0, 3, 3, 2, 3, 0, 0, 1, 0, 3, 0, 0, 1, 2, 1, 0, 1, 2, 2, 3, 2, 1, 1, 1, 0, 3, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Taking every sixteenth term gives the same sequence: (and similarly for all higher powers of 16 as well): a(n) = a(16*n).

LINKS

A. Karttunen, Table of n, a(n) for n = 1..4096

FORMULA

a(n) = A010873(A163538(n) + A163539(n) + abs(A163538(n)) + 3).

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] = L[0]; Map[(a[n_ /; IntegerQ[(n - #)/16]] := Part[Flatten[a[(n + 16 - #)/16/.HC/.HC], #]) &, Range[16]];

Part[FoldList[Mod[Plus[#1, #2], 4] &, 0, a[#] & /@ Range[4^4]/.{F[n_]:>0, L[n_]:>1, R[n_]:>-1}], 2 ;; -1] (* Bradley Klee, Aug 07 2015 *)

PROG

(Scheme:) (define (A163541 n) (modulo (+ 3 (A163538 n) (A163539 n) (abs (A163538 n))) 4))

CROSSREFS

a(n) = A163541(A008598(n)) = A004442(A163540(n)). See also A163543.

Sequence in context: A133574 A133573 A151859 * A280815 A165974 A090622

Adjacent sequences:  A163538 A163539 A163540 * A163542 A163543 A163544

KEYWORD

nonn

AUTHOR

Antti Karttunen, Aug 01 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 5 15:22 EST 2021. Contains 341825 sequences. (Running on oeis4.)