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.

Showing 1-4 of 4 results.

A348022 The numbers visited on a square spiral when stepping to the smallest unvisited number that is visible from and shares a divisor > 1 with the current number. Start with 1 and 2.

Original entry on oeis.org

1, 2, 4, 6, 3, 12, 9, 15, 5, 10, 14, 7, 21, 27, 18, 16, 8, 22, 11, 33, 30, 20, 24, 32, 26, 13, 39, 36, 28, 35, 25, 40, 44, 38, 19, 76, 34, 17, 68, 42, 45, 51, 48, 57, 66, 55, 60, 46, 23, 92, 58, 50, 62, 31, 155, 70, 49, 56, 63, 72, 64, 52, 65, 78, 54, 69, 84, 75, 85, 80, 94, 47, 188
Offset: 1

Views

Author

Scott R. Shannon, Sep 25 2021

Keywords

Comments

A number is visible from the current number if, given it has coordinates (x,y) relative to the current number, the greatest common divisor of |x| and |y| equals 1. See A331400 for the points visible from the starting 1 number.
In the first 10000 terms the longest single step is one at n = 9942 of length sqrt(22570) units between 31002 to 10258. The maximum difference between terms in the same range is from 5171 to 36197 at n = 9977.

Examples

			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(3) = 4 as gcd(4,2) = 2 and 4 is unvisited and visible from 2.
a(4) = 6 as gcd(4,6) = 2 and 6 is unvisited and visible from 4.
a(5) = 3 as gcd(3,6) = 3 and 3 is unvisited and visible from 6.
a(6) = 12 as gcd(12,3) = 3 and 12 is unvisited and visible from 3. Note although 9 is unvisited and gcd(9,3) = 3 it is not visible from 3 due to 2.
		

Crossrefs

Cf. A348025 (not visible), A331400, A335661, A063826, A332767, A347358.

A347522 The prime numbers visited on a square spiral when starting at 1 and then stepping to the smallest unvisited prime number that is not visible from the current number.

Original entry on oeis.org

1, 11, 13, 7, 3, 5, 29, 23, 17, 19, 2, 47, 31, 37, 41, 43, 83, 89, 97, 53, 59, 61, 67, 71, 73, 79, 103, 101, 107, 109, 113, 131, 127, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 229, 227, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 331, 293, 307, 311
Offset: 1

Views

Author

Scott R. Shannon, Sep 05 2021

Keywords

Comments

A number is not visible from the current number if, given it has coordinates (x,y) relative to the current number, the greatest common divisor of |x| and |y| is greater than 1.
As n increases the vast majority of primes are on the same square ring of numbers as the current prime. However occasionally, especially for primes inside the right side quadrant, the next prime is on an outer or inner ring which causes the step to make a diagonal line. See the linked images. The largest diagonal step after 50000 terms is one at step 43936 between primes 532981 and 531457 which is seen as the long violet diagonal line from the top-left to the bottom-right in the image for these terms. No other such diagonal line is seen up to 10^6 terms.

Examples

			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(1) = 1. The central starting number.
a(2) = 11 as the smaller prime numbers 2,3,5,7 are all visible from 1, while 11 is hidden by 2.
a(3) = 13 as the smaller prime numbers 2,3,5,7 are all visible from 11, while 13 is hidden by 12.
a(4) = 7 as the smaller prime numbers 2,3,5 are visible from 13, while 7 is hidden by 1 and 3.
a(7) = 29 as the smaller prime numbers 2,17,19,23 are visible from 5, while 29 is hidden by 3,4 and 12.
		

Crossrefs

Cf. A347358 (step to smallest visible), A000040, A063826, A214664, A214665, A331400, A335364, A332767, A330979.

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.

Original entry on oeis.org

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, 20, 31, 24, 35, 26, 33, 25, 28, 41, 34, 45, 38, 47, 30, 37, 44, 51, 40, 57, 46, 53, 42, 55, 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
Offset: 1

Views

Author

Scott R. Shannon, Sep 25 2021

Keywords

Comments

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).
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.
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.

Examples

			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(3) = 8 as gcd(8,3) = 1 and 8 is unvisited, visible from 3, and does not equal 2 or 4.
a(4) = 5 as gcd(5,8) = 1 and 5 is unvisited, visible from 8, and does not equal 7 or 9.
a(5) = 2 as gcd(2,5) = 1 and 2 is unvisited, visible from 5, and does not equal 4 or 6.
		

Crossrefs

A363824 a(0) = 0; for n > 0, a(n) is the total number of other numbers, being constructed on a square spiral, that are visible from a(n-1) that equal a(n-1).

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 2, 0, 3, 0, 3, 1, 1, 2, 2, 3, 2, 2, 5, 0, 3, 2, 4, 0, 5, 0, 4, 1, 3, 3, 4, 1, 3, 4, 1, 3, 5, 1, 4, 1, 5, 2, 5, 2, 6, 0, 4, 2, 7, 0, 4, 5, 4, 4, 5, 3, 6, 1, 5, 3, 5, 4, 9, 0, 4, 6, 1, 8, 0, 9, 1, 7, 0, 10, 0, 10, 0, 9, 2, 7, 2, 6, 3, 6, 3, 6, 1, 7, 2, 9, 1, 7, 3, 6, 4, 7, 2, 8, 0
Offset: 0

Views

Author

Scott R. Shannon, Oct 19 2023

Keywords

Comments

A number is visible from any given number if, given that it has coordinates (x,y) relative to that number, the greatest common divisor of |x| and |y| is 1.

Examples

			The spiral begins:
.
                                .
    5---3---1---4---3---1---4   :
    |                       |   :
    1   2---3---2---2---1   3   5
    |   |               |   |   |
    4   2   2---0---1   1   3   4
    |   |   |       |   |   |   |
    1   5   0   0---0   3   1   4
    |   |   |           |   |   |
    5   0   2---0---3---0   4   5
    |   |                   |   |
    2   3---2---4---0---5---0   4
    |                           |
    5---2---6---0---4---2---7---0
.
a(1) = 0 as a(0) = 0, and there are currently no other numbers that equal 0.
a(2) = 1 as a(1) = 0, and from a(1), at (1,0) relative to the starting square, there is currently one other visible 0, namely a(0).
a(6) = 2 as a(5) = 0, and from a(5), at (-1,0) relative to the starting square, there are currently two other visible 0's, namely a(0) and a(3). Note that a(1) = 0 is not visible as it is hidden by a(0).
		

Crossrefs

Showing 1-4 of 4 results.