login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
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, 31, 56, 55, 30, 54, 87, 88, 89, 130, 129, 177, 128, 127, 86, 85, 84, 51, 26, 25, 10, 11, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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.
LINKS
Scott R. Shannon, Image of the path after 500000 steps. 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.
EXAMPLE
The square spiral is numbered as follows:
.
17--16--15--14--13 .
| | .
18 5---4---3 12 29
| | | | |
19 6 1---2 11 28
| | | |
20 7---8---9--10 27
| |
21--22--23--24--25--26
.
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.
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.
CROSSREFS
Cf. A348672 (add to prime), A332767, A338642, A002808.
Sequence in context: A302677 A304267 A166138 * A302512 A126937 A282471
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Oct 29 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 08:20 EDT 2024. Contains 371782 sequences. (Running on oeis4.)