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.

A336799 The numbers visited on a square spiral, with a(1)=1, a(2)=2, a(3) = 6, when stepping to an unvisited number as close as possible to the n = 1 starting position that has at least one common factor with the last visited number but none with the second last visited number. In case of a tie, choose the smallest number.

This page as a plain text file.
%I A336799 #12 Feb 05 2021 00:17:12
%S A336799 1,2,6,15,35,14,12,33,77,28,10,45,21,56,20,55,99,18,34,85,75,24,22,
%T A336799 143,39,30,46,161,63,36,40,95,57,42,26,65,105,48,38,247,117,69,115,70,
%U A336799 44,187,51,54,52,91,119,68,60,87,203,98,62,93,129,86,76,133,175,50,78,141,235,80,58,261
%N A336799 The numbers visited on a square spiral, with a(1)=1, a(2)=2, a(3) = 6, when stepping to an unvisited number as close as possible to the n = 1 starting position that has at least one common factor with the last visited number but none with the second last visited number. In case of a tie, choose the smallest number.
%C A336799 This sequence is the square spiral version of the Enots Wolley sequence A336957. The same rules for selecting the next number apply except that, instead of choosing the smallest unvisited number for a(n), the number closest to the starting n = 1 position which satisfies the selection rules is chosen. If two or more such numbers exist then the smallest is chosen.
%C A336799 The first term that differs from A336957 is a(9) = 77. See the examples below.
%H A336799 Scott R. Shannon, <a href="/A336799/a336799.png">Image of the first 100000 visited numbers on the square spiral</a>. The colors are graduated across the spectrum from red to violet to indicate the relative visit order of the numbers. The starting 1 position is colored white. As the sequence cannot visit primes or prime powers many of the black unvisited squares form the typical diagonal-line pattern seen in the Ulam prime spiral.
%e A336799 The square spiral used is:
%e A336799 .
%e A336799   17--16--15--14--13   .
%e A336799    |               |   .
%e A336799   18   5---4---3  12   29
%e A336799    |   |       |   |   |
%e A336799   19   6   1---2  11   28
%e A336799    |   |           |   |
%e A336799   20   7---8---9--10   27
%e A336799    |                   |
%e A336799   21--22--23--24--25--26
%e A336799 .
%e A336799 a(8) = 33 as a(7) = 12 = 2*2*3 and a(6) = 14 = 2*7, thus a(8) must contain 3 or 2 as a factor but not 2 or 7. As a(6) excludes 2 it must contain 3 as a factor, and another prime other than 3. The closest unvisited number to the starting 1 position that satisfies these conditions is 33.
%e A336799 a(9) = 77 as a(8) = 33 = 3*11 and a(7) = 12 = 2*2*3, thus a(9) must contain 3 or 11 as a factor but not 2 or 3. As a(7) excludes 3 it must contain 11 as a factor, and another prime other than 11. The smallest unvisited number satisfying these conditions is 55, which is sqrt(20) ~ 4.47 units from 1. However 77 is unvisited and also satisfies the conditions, and is only 4 units from 1, thus a(9) = 77. This is the first term that differs from A336957.
%Y A336799 Cf. A336957, A098550, A335661, A330979, A340783, A064413.
%K A336799 nonn
%O A336799 1,2
%A A336799 _Scott R. Shannon_, Jan 27 2021