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.
%I A059252 #47 Jun 08 2021 13:53:11 %S A059252 0,0,1,1,2,3,3,2,2,3,3,2,1,1,0,0,0,1,1,0,0,0,1,1,2,2,3,3,3,2,2,3,4,5, %T A059252 5,4,4,4,5,5,6,6,7,7,7,6,6,7,7,7,6,6,5,4,4,5,5,4,4,5,6,6,7,7,8,9,9,8, %U A059252 8,8,9,9,10,10,11,11,11,10,10,11,12,12,13,13,14,15,15,14,14,15,15,14 %N A059252 Hilbert's Hamiltonian walk on N X N projected onto x axis: m(3). %C A059252 This is the X-coordinate of the n-th term in Hilbert's Hamiltonian walk A163359 and the Y-coordinate of its transpose A163357. %H A059252 Antti Karttunen, <a href="/A059252/b059252.txt">Table of n, a(n) for n = 0..65535</a> %H A059252 Joerg Arndt, <a href="http://www.jjj.de/fxt/#fxtbook">Matters Computational (The Fxtbook)</a>, section 1.31.1 "The Hilbert curve", page 85, lin2hilbert. %H A059252 Michael Beeler, R. William Gosper, and Richard Schroeppel, <a href="https://dspace.mit.edu/handle/1721.1/6086">HAKMEM</a>, MIT Artificial Intelligence Laboratory report AIM-239, February 1972. Item 115 by Gosper, page 52. Also <a href="http://www.inwap.com/pdp10/hbaker/hakmem/topology.html#item115">HTML transcription</a>. (To use algorithm S or the state table, pad n with high 0-bits to a multiple of 4 bits.) %H A059252 J. Shallit, <a href="https://arxiv.org/abs/2106.01062">Hilbert's spacefilling curve described by automatic, regular, and synchronized sequences</a>, arXiv:2106.01062 [cs.FL], June 2 2021. %H A059252 <a href="/index/Con#coordinates_2D_curves">Index entries for sequences related to coordinates of 2D curves</a> %F A059252 Initially [m(0) = 0, m'(0) = 0]; recursion: m(2n + 1) = m(2n).m'(2n).f(m'(2n), 2n).c(m(2n), 2n + 1); m'(2n + 1) = m'(2n).f(m(2n), 2n).f(m(2n), 2n).mir(m'(2n)); m(2n) = m(2n - 1).f(m'(2n - 1), 2n - 1).f(m'(2n - 1), 2n - 1).mir(m(2n - 1)); m'(2n) = m'(2n - 1).m(2n - 1).f(m(2n - 1), 2n - 1).c(m'(2n - 1), 2n); where f(m, n) is the alphabetic morphism i := i + 2^n [example: f(0 0 1 1 2 3 3 2 2 3 3 2 1 1 0 0, 2) = 4 4 5 5 6 7 7 6 6 7 7 6 5 5 4 4]; c(m, n) is the complementation to 2^n - 1 alphabetic morphism [example: c(0 0 1 1 2 3 3 2 2 3 3 2 1 1 0 0, 3) = 7 7 6 6 5 4 4 5 5 4 4 5 6 6 7 7]; and mir(m) is the mirror operator [example: mir(0 1 1 0 0 0 1 1 2 2 3 3 3 2 2 3) = 3 2 2 3 3 3 2 2 1 1 0 0 0 1 1 0]. %F A059252 a(n) = A002262(A163358(n)) = A025581(A163360(n)) = A059906(A163356(n)). %e A059252 [m(1)=0 0 1 1, m'(1)= 0 1 10] [m(2) =0 0 1 1 2 3 3 2 2 3 3 2 1 1 0 0, m'(2)=0 1 1 0 0 0 1 1 2 2 3 3 3 2 2 3]. %o A059252 (C) void h(unsigned int *x, unsigned int *y, unsigned int l){ %o A059252 x[0] = y[0] = 0; unsigned int *t = NULL; unsigned int n = 0, k = 0; %o A059252 for(unsigned int i = 1; i<l; i++){ %o A059252 switch(i>>(2*n)){ %o A059252 case 1: x[i] = y[i&k]; y[i] = x[i&k]+(1<<n); break; %o A059252 case 2: x[i] = y[i&k]+(1<<n); y[i] = x[i&k]+(1<<n); break; %o A059252 case 3: x[i] = (2<<n)-1-x[i&k]; y[i] = y[k-i&k]; break; %o A059252 case 4: n++; k = (1<<(2*n))-1; t=x; x=y; y=t; x[i] = 0; y[i] = 1<<n; break; %o A059252 default:;}}} /* _Jared Rager_, Jan 09 2021 */ %o A059252 (C++) See Fxtbook link. %Y A059252 See also the y-projection, m'(3), A059253, as well as: A163539, A163540, A163542, A059261, A059285, A163547 and A163529. %K A059252 nonn %O A059252 0,5 %A A059252 Claude Lenormand (claude.lenormand(AT)free.fr), Jan 23 2001 %E A059252 Extended by _Antti Karttunen_, Aug 01 2009