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.

A337822 Permutation of the natural numbers formed by numbering an infinite square grid by a counterclockwise diamond spiral and visiting them by a counterclockwise stair step spiral.

Original entry on oeis.org

1, 2, 8, 3, 9, 20, 10, 21, 11, 4, 12, 5, 13, 14, 6, 15, 7, 16, 30, 17, 31, 18, 32, 19, 33, 52, 34, 53, 35, 54, 36, 55, 37, 22, 38, 23, 39, 24, 40, 25, 41, 42, 26, 43, 27, 44, 28, 45, 29, 46, 68, 47, 69, 48, 70, 49, 71, 50, 72, 51, 73, 100, 74, 101, 75, 102, 76
Offset: 1

Views

Author

Mohammed Yaseen, Sep 24 2020

Keywords

Examples

			The path begins:
.
               ---33
                   |
              34  19--32
                       |
          35  20---9  18--31  48
               |   |       |
      36  21--10   3---8  17--30  47
           |           |       |
  37  22  11---4   1---2   7--16  29  46
               |           |
      38  23  12---5   6--15  28  45
                   |   |
          39  24  13--14  27  44
.
              40  25  26  43
.
                  41  42
.
		

Crossrefs

Cf. A102083.
Diamond spiral coordinates (but 0-based): A010751, A305258.
Same type of visit on other types of spirals: A334619, A337838.

Formula

a(A102083(n)) = A102083(n) and a(A102083(n)+1) = A102083(n)+1.