cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A163541 #22 Jul 12 2025 08:35:22
%S A163541 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,
%T A163541 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,
%U A163541 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
%N 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.
%C A163541 Taking every sixteenth term gives the same sequence: (and similarly for all higher powers of 16 as well): a(n) = a(16*n).
%H A163541 Antti Karttunen, <a href="/A163541/b163541.txt">Table of n, a(n) for n = 1..4096</a>
%F A163541 a(n) = A010873(A163538(n) + A163539(n) + abs(A163538(n)) + 3).
%t A163541 HC = {L[n_ /; IntegerQ[n/2]] :> {F[n], L[n], L[n + 1], R[n + 2]},
%t A163541 R[n_ /; IntegerQ[(n + 1)/2]] :> {F[n], R[n], R[n + 3], L[n + 2]},
%t A163541 R[n_ /; IntegerQ[n/2]] :> {L[n], R[n + 1], R[n], F[n + 3]},
%t A163541 L[n_ /; IntegerQ[(n + 1)/2]] :> {R[n], L[n + 3], L[n], F[n + 1]},
%t A163541 F[n_ /; IntegerQ[n/2]] :> {L[n], R[n + 1], R[n], L[n + 3]},
%t A163541 F[n_ /; IntegerQ[(n + 1)/2]] :> {R[n], L[n + 3], L[n], R[n + 1]}};
%t A163541 a[1] = L[0]; Map[(a[n_ /; IntegerQ[(n - #)/16]] := Part[Flatten[a[(n + 16 - #)/16]/.HC/.HC],#]) &, Range[16]];
%t A163541 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 *)
%o A163541 (Scheme) (define (A163541 n) (modulo (+ 3 (A163538 n) (A163539 n) (abs (A163538 n))) 4))
%Y A163541 a(n) = A163541(A008598(n)) = A004442(A163540(n)). See also A163543.
%K A163541 nonn
%O A163541 1,3
%A A163541 _Antti Karttunen_, Aug 01 2009