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.

A348026 The numbers visited on a square spiral when stepping to the smallest unvisited number that does not differ by 1 from the current number, is visible from the current number, and does not share a divisor > 1 with the current number.

This page as a plain text file.
%I A348026 #15 Oct 06 2021 12:49:26
%S A348026 1,3,8,5,2,7,4,9,11,14,19,6,13,18,23,10,17,12,29,15,22,27,16,21,32,39,
%T A348026 20,31,24,35,26,33,25,28,41,34,45,38,47,30,37,44,51,40,57,46,53,42,55,
%U A348026 36,43,52,49,54,59,50,61,48,65,56,67,58,69,62,73,60,71,64,75,68,63,74,83,70,81,85
%N A348026 The numbers visited on a square spiral when stepping to the smallest unvisited number that does not differ by 1 from the current number, is visible from the current number, and does not share a divisor > 1 with the current number.
%C A348026 A number is visible from the current number if, given that it has coordinates (x,y) relative to the current number, the greatest common divisor of |x| and |y| is 1. The sequence has a(2) = 3 as that is the smallest number visible from a(1) = 1 that does not differ by 1 from a(1).
%C A348026 The majority of steps between terms are diagonals across the current number's nearest corner of the square spiral and thus do not approach the center of the spiral. Occasionally, however, a long diagonal step directly across the center of the spiral is taken. See the linked image.
%C A348026 In the first 20000 terms the longest single step is the one at n = 19534 of length sqrt(38365) units between 19743 at coordinates (-68,-70), to 19460 at coordinates (70,69). This step also yields the maximum difference between terms in the same range.
%H A348026 Scott R. Shannon, <a href="/A348026/a348026.gif">Image of the path for the first 20000 terms</a>. The colors are graduated across the spectrum to show the relative step order.
%e A348026 The square spiral is numbered as follows:
%e A348026 .
%e A348026   17--16--15--14--13   .
%e A348026    |               |   .
%e A348026   18   5---4---3  12  29
%e A348026    |   |       |   |   |
%e A348026   19   6   1---2  11  28
%e A348026    |   |           |   |
%e A348026   20   7---8---9--10  27
%e A348026    |                   |
%e A348026   21--22--23--24--25--26
%e A348026 .
%e A348026 a(3) = 8 as gcd(8,3) = 1 and 8 is unvisited, visible from 3, and does not equal 2 or 4.
%e A348026 a(4) = 5 as gcd(5,8) = 1 and 5 is unvisited, visible from 8, and does not equal 7 or 9.
%e A348026 a(5) = 2 as gcd(2,5) = 1 and 2 is unvisited, visible from 5, and does not equal 4 or 6.
%Y A348026 Cf. A348022, A331400, A335661, A063826, A332767, A347358, A335661.
%K A348026 nonn
%O A348026 1,2
%A A348026 _Scott R. Shannon_, Sep 25 2021