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.

A334474 T(n, k) is the number of steps from the point (0, 0) to the point (k, n) along the space filling curve T defined in Comments section; square array T(n, k), n, k >= 0 read by antidiagonals downwards.

This page as a plain text file.
%I A334474 #28 Dec 21 2024 10:54:00
%S A334474 0,2,1,8,3,4,9,7,6,5,31,10,11,15,16,32,30,12,14,18,17,33,29,27,13,24,
%T A334474 19,20,35,34,28,26,25,23,22,21,121,36,37,41,42,61,62,63,64,122,120,38,
%U A334474 40,43,44,60,59,66,65,123,119,117,39,47,46,45,58,72,67,68
%N A334474 T(n, k) is the number of steps from the point (0, 0) to the point (k, n) along the space filling curve T defined in Comments section; square array T(n, k), n, k >= 0 read by antidiagonals downwards.
%C A334474 We consider a hexagonal lattice with X-axis and Y-axis as follows:
%C A334474            Y
%C A334474           /
%C A334474          /
%C A334474         0 ---- X
%C A334474 We define the family {T_n, n > 0} as follows:
%C A334474 - T_1 contains the origin (0, 0):
%C A334474           +
%C A334474          O
%C A334474 - T_2 contains the points (0, 0), (0, 1) and (1, 0), in that order:
%C A334474           +
%C A334474          / \
%C A334474         /   \
%C A334474        + . . +
%C A334474       O
%C A334474 - for n > 1, T_{2*n} is built from 3 copies of T_n and one copy T_{n-1} arranged as follows:
%C A334474                     +
%C A334474                    / \
%C A334474                   /   \
%C A334474                  /  n  \
%C A334474                 /       \
%C A334474                + . . . . +
%C A334474                 \         \
%C A334474              +   +-----+   +
%C A334474             / \   .n-1/   / .
%C A334474            /   \   . /   /   .
%C A334474           /  n  \   +   /  n  .
%C A334474          /       \ /   /       .
%C A334474         + . . . . +   +---------+
%C A334474        O
%C A334474 - for n > 0, T_{2*n+1} is built from 3 copies of T_n and one copy of T_{n+1} arranged as follows:
%C A334474                     +
%C A334474                    / \
%C A334474                   /   \
%C A334474                  /     \
%C A334474                 /  n+1  \
%C A334474                /         \
%C A334474               + . . . . . +
%C A334474               \            \
%C A334474             +  +---------+  +
%C A334474            / \  .       /  / .
%C A334474           /   \  .  n  /  /   .
%C A334474          /  n  \  .   /  /  n  .
%C A334474         /       \  . /  /       .
%C A334474        + . . . . +--+  +---------+
%C A334474       O
%C A334474 - for any n > 0, T_n starts at (0, 0) and ends at (n-1, n-1), and contains every point (x, y) such that x, y >= 0 and x + y < n,
%C A334474 - T is the limit of T_{2^k} as k tends to infinity (note that for any k >= 0, T_{2^k} is a prefix of T_{2^(k+1)}),
%C A334474 - T visits exactly once every point (x, y) such that x, y >= 0.
%H A334474 Ideophilus, <a href="https://ideophilus.wordpress.com/2012/09/06/a-triangular-space-filling-curve/">A triangular space-filling curve</a>
%H A334474 Rémy Sigrist, <a href="/A334474/a334474_1.png">Colored representation of T_{2^10}</a> (where the hue is function of the number of steps from the origin)
%H A334474 Rémy Sigrist, <a href="/A334474/a334474.png">Representation of T_{2^k} for k = 1..5</a>
%H A334474 Rémy Sigrist, <a href="/A334474/a334474.gp.txt">PARI program for A334474</a>
%F A334474 T(A334476(n), A334475(n)) = n.
%e A334474 Square array starts:
%e A334474   n\k|   0  1  2  3  4  5  6  7
%e A334474   ---+-------------------------
%e A334474     0|   0  2  8--9 31-32-33 35
%e A334474      |   | /|  |  |  |     | /|
%e A334474      |   |/ |  |  |  |     |/ |
%e A334474     1|   1  3  7 10 30-29 34 36
%e A334474      |     /  /  /      |    /
%e A334474      |    /  /  /       |   /
%e A334474     2|   4  6 11-12 27-28 37-38
%e A334474      |   | /      |  |        |
%e A334474      |   |/       |  |        |
%e A334474     3|   5 15-14-13 26 41-40-39
%e A334474      |    /         /  /
%e A334474      |   /         /  /
%e A334474     4|  16 18 24-25 42-43 47-48
%e A334474      |   | /|  |       /  /   |
%e A334474      |   |/ |  |      /  /    |
%e A334474     5|  17 19 23 61 44 46 50-49
%e A334474      |     /  /  /|  | /   |
%e A334474      |    /  /  / |  |/    |
%e A334474     6|  20 22 62 60 45 56 51-52-
%e A334474      |   | /  /  /     /|
%o A334474 (PARI) \\ See Links section.
%Y A334474 See A334475 and A334476 for the coordinates of the curve.
%K A334474 nonn,tabl
%O A334474 0,2
%A A334474 _Rémy Sigrist_, May 02 2020