OFFSET
0,2
LINKS
A. Karttunen, Table of n, a(n) for n = 0..32895
David Hilbert, Ueber die stetige Abbildung einer Linie auf ein Flächenstück, Mathematische Annalen, volume 38, number 3, 1891, pages 459-460. Also EUDML (link to GDZ).
Eric Weisstein's World of Mathematics, Hilbert curve
Wikipedia, Self-avoiding walk
Wikipedia, Space-filling curve
EXAMPLE
The top left 8x8 corner of the array shows how this surjective self-avoiding walk begins (connect the terms in numerical order, 0-1-2-3-...):
+0 +3 +4 +5 58 59 60 63
+1 +2 +7 +6 57 56 61 62
14 13 +8 +9 54 55 50 49
15 12 11 10 53 52 51 48
16 17 30 31 32 33 46 47
19 18 29 28 35 34 45 44
20 23 24 27 36 39 40 43
21 22 25 26 37 38 41 42
MATHEMATICA
b[{n_, k_}, {m_}] := (A[n, k] = m-1);
MapIndexed[b, List @@ HilbertCurve[4][[1]]];
Table[A[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Mar 07 2021 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Jul 29 2009
STATUS
approved