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.

A334751 a(n) is the number immediately above n in a clockwise square spiral of the positive integers with the first step to the right.

This page as a plain text file.
%I A334751 #15 May 11 2020 15:15:59
%S A334751 8,9,2,1,6,7,22,23,24,25,10,11,12,3,4,5,18,19,20,21,44,45,46,47,48,49,
%T A334751 26,27,28,29,30,13,14,15,16,17,38,39,40,41,42,43,74,75,76,77,78,79,80,
%U A334751 81,50,51,52,53,54,55,56,31,32,33,34,35,36,37,66,67,68,69
%N A334751 a(n) is the number immediately above n in a clockwise square spiral of the positive integers with the first step to the right.
%C A334751 Equivalently the number immediately below n in a counterclockwise spiral of the positive integers with the first step to the right.
%C A334751 This is a permutation of the positive integers. A334752 is the inverse permutation.
%H A334751 Peter Kagey, <a href="/A334751/b334751.txt">Table of n, a(n) for n = 1..10000</a>
%H A334751 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A334751 For n = 1, a(1) = 8 because 8 is immediately above one in the clockwise square spiral with first step to the right:
%e A334751   21--22--23--24--25--26
%e A334751   |                    |
%e A334751   20  7---8---9---10  27
%e A334751   |   |            |   |
%e A334751   19  6   1---2   11  28
%e A334751   |   |       |    |   |
%e A334751   18  5---4---3   12  29
%e A334751   |                |   |
%e A334751   17--16--15--14--13  30
%e A334751                        |
%e A334751   36--35--34--33--32--31
%Y A334751 Cf. A068225 (right), A068226 (left), A334752 (below).
%Y A334751 Cf. A174344 (x-coordinate), A268038 (y-coordinate).
%K A334751 nonn
%O A334751 1,1
%A A334751 _Peter Kagey_, May 10 2020