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.

A348673 The numbers visited on a square spiral when stepping to the closest unvisited number such that the sum of that number and the current number is composite. If two or more such numbers exist then the smallest is chosen.

This page as a plain text file.
%I A348673 #19 Oct 30 2021 13:50:34
%S A348673 1,8,7,20,19,6,4,5,16,17,18,39,38,37,63,36,62,61,34,15,3,12,13,14,32,
%T A348673 31,56,55,30,54,87,88,89,130,129,177,128,127,86,85,84,51,26,25,10,11,
%U A348673 28,27,53,52,50,49,80,79,47,46,23,22,44,21,42,43,72,71,70,41,40,68,67,66,103,102
%N A348673 The numbers visited on a square spiral when stepping to the closest unvisited number such that the sum of that number and the current number is composite. If two or more such numbers exist then the smallest is chosen.
%C A348673 Despite the relative number of composite numbers increasing as n increases the path taken by the numbers still approaches the origin numerous times via unvisited squares for larger values of n. See the linked image. After 100 million steps the smallest unvisited number is 2; it is unknown if it is eventually visited for very large n.
%H A348673 Scott R. Shannon, <a href="/A348673/a348673.png">Image of the path after 500000 steps</a>. The colors are graduated across the spectrum to show the relative step order. Notice how green and purple colored paths, representing visited numbers after about 250000 and 450000 steps, approach the origin, marked with a white dot, via previously unvisited numbers.
%e A348673 The square spiral is numbered as follows:
%e A348673 .
%e A348673   17--16--15--14--13   .
%e A348673    |               |   .
%e A348673   18   5---4---3  12  29
%e A348673    |   |       |   |   |
%e A348673   19   6   1---2  11  28
%e A348673    |   |           |   |
%e A348673   20   7---8---9--10  27
%e A348673    |                   |
%e A348673   21--22--23--24--25--26
%e A348673 .
%e A348673 a(2) = 8 as of the four closest neighbors to 1, namely 2,4,6 and 8, only 1+8=9 forms a composite number.
%e A348673 a(7) = 4 as the closest unvisited number to 6 is 5, but 6+5=11 is prime. The next two closest unvisited numbers are 4 and 18 both of which sum to composites, but 4 is chosen as that is the smaller of the two.
%Y A348673 Cf. A348672 (add to prime),  A332767, A338642, A002808.
%K A348673 nonn
%O A348673 1,2
%A A348673 _Scott R. Shannon_, Oct 29 2021