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.

Previous Showing 11-18 of 18 results.

A336576 The final square number for a walk on a square spiral numbered board when starting on square 1 and stepping to an unvisited square containing the lowest prime number, where the square is within a block of size (2n+1) x (2n+1) centered on the current square. If no unvisited prime numbered squares exist within the block the walk ends.

Original entry on oeis.org

59, 947, 313, 3331, 5659, 67547, 253801, 676259, 3162413, 16604417, 29135971, 108235159, 437456497
Offset: 1

Views

Author

Scott R. Shannon, Jul 26 2020

Keywords

Comments

See A336494 for an explanation of the sequence and images of the walks.

Examples

			a(1) = 59. Starting from the square 1 the sequence of adjacent unvisited lowest primes the walk can step to are 2,3,11,29,13,31,59. Once the square 59 is visited there are no other unvisited adjacent squares containing primes, so the walk terminates.
		

Crossrefs

Cf. A336494 (total number of steps), A335856, A000040, A136626, A336092, A330979, A332767, A335661, A335364.

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

Original entry on oeis.org

1, 11, 6, 14, 2, 16, 7, 9, 17, 13, 10, 20, 18, 3, 5, 12, 22, 24, 21, 25, 19, 33, 31, 26, 28, 30, 27, 35, 32, 36, 47, 39, 29, 37, 40, 42, 38, 43, 45, 48, 44, 49, 41, 52, 50, 53, 55, 51, 56, 66, 54, 63, 57, 59, 61, 4, 23, 15, 46, 34, 77, 73, 65, 58, 62, 90, 64, 106, 74, 76, 79, 75, 80, 82, 78, 95
Offset: 1

Views

Author

Scott R. Shannon, Sep 04 2021

Keywords

Comments

On the standard square spiral 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. For this sequence at least one other number must also exist on the line connecting these two numbers for them to be hidden from each other. Most visited primes are stepped over by subsequent terms. See the first linked image.
See A331400 for the points visible from the starting 1 number.

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 is the central starting number.
a(2) = 11 as the numbers 2..10 are all visible from 1, while 11 is hidden by 2. After stepping to 11 the number 1 is removed.
a(3) = 6 as the numbers 2..5 are all visible from 11, while 6 is hidden by 2. After stepping to 6 the number 11 is removed.
a(4) = 14 as the numbers 2..5,7..10,12,13 are all visible from 6, while 14 is hidden by 4. After stepping to 14 the number 6 is removed. This is the first term that differs from A347357 as here the number 1 has been removed thus 2 is visible from 6.
		

Crossrefs

Cf. A347357 (do not remove number after step), A063826, A214664, A214665, A331400, A330979, A332767.

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.

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

Original entry on oeis.org

1, 11, 55, 15, 21, 3, 9, 27, 30, 2, 6, 14, 16, 10, 4, 8, 12, 18, 20, 32, 34, 28, 22, 24, 26, 36, 33, 39, 42, 38, 40, 46, 44, 48, 45, 5, 25, 65, 13, 91, 7, 35, 49, 105, 51, 17, 153, 57, 19, 114, 50, 52, 54, 56, 66, 68, 62, 58, 29, 87, 84, 60, 63, 69, 23, 161, 77, 99, 93, 31, 124, 70, 72
Offset: 1

Views

Author

Scott R. Shannon, Sep 25 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. The sequence has a(2) = 11 as that is the smallest number not visible from a(1) = 1.
In the first 10000 terms the longest single step is one at n = 6888 of length sqrt(22556) units between 22203 to 7389. The maximum difference between terms in the same range is from 3469 to 58973 at n = 9709.

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) = 55 as gcd(55,11) = 11 and 55 is unvisited and not visible from 11, being blocked by 29.
a(4) = 15 as gcd(15,55) = 5 and 15 is unvisited and not visible from 55, being blocked by 13, 14 and 30.
a(5) = 21 as gcd(21,15) = 3 and 21 is unvisited and not visible from 15, being blocked by 6.
		

Crossrefs

A348672 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 prime. If two or more such numbers exist then the smallest is chosen.

Original entry on oeis.org

1, 2, 3, 4, 15, 14, 33, 34, 13, 30, 29, 12, 11, 8, 9, 10, 27, 26, 47, 24, 23, 6, 5, 18, 19, 40, 39, 68, 69, 70, 43, 108, 71, 42, 41, 20, 21, 22, 7, 46, 25, 48, 49, 52, 51, 50, 81, 82, 169, 168, 221, 222, 167, 164, 117, 116, 77, 114, 113, 44, 45, 112, 111, 158, 159, 214, 277, 280, 351, 350, 281
Offset: 1

Views

Author

Scott R. Shannon, Oct 29 2021

Keywords

Comments

The path taken by the visited numbers approaches the spiral origin numerous times via unvisited squares for larger values of n. See the linked image. After 1 million steps the smallest unvisited number is 196, although it is possible this and similar smaller numbers are eventually visited for very large n.

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(2) = 2 as the three closest neighbors to 1 which when added to 1 form a prime are 2,4 and 6. Of those 2 is the smallest.
a(9) = 13 as the twelve closest numbers to 34 have either been visited or form a composite when added to 34. The closest and smallest unvisited number which forms a prime when added to 34 is 13.
		

Crossrefs

Cf. A348673 (add to composite), A332767, A338642, A000040.

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Scott R. Shannon, Oct 29 2021

Keywords

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.

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

A346429 Squares visited on a square spiral when stepping to the closest unvisited square that contains a number with a different number of divisors to the number in the current square. If two or more such squares are the same distance from the current square then the one with the smallest number is chosen.

Original entry on oeis.org

1, 2, 9, 8, 7, 6, 5, 4, 3, 12, 11, 10, 25, 24, 23, 22, 45, 46, 47, 48, 49, 26, 50, 51, 52, 27, 28, 29, 30, 13, 14, 32, 31, 56, 55, 54, 53, 86, 127, 126, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 115, 114, 75, 74, 43, 42, 21, 20, 19, 18, 17, 16, 15, 61, 34, 60, 33, 59, 58, 92, 57, 90, 89, 88, 87
Offset: 1

Views

Author

Scott R. Shannon, Jul 17 2021

Keywords

Comments

The first term at which a step to a non-adjacent square is required is a(64) = 61; the previous square 15 having neighbors already visited or with four divisors.
The linked images show that the path of visited squares can approach the origin after many terms. For example 44 is not visited until the 973644th step, although 43 and 45 are visited after 54 and 16 steps respectively. It is possible eventually all squares are visited although this is unknown.
In the first 10 million terms the longest step distance between terms is on the 8836645th step, between 1548859 and 1578754, a distance of ~90.2 units.

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) = 9 as a(2) = 2 which has two divisors, and the closest three unvisited squares around 2 are 3, 11 and 9, and of those only 9 has a divisor count not equal to two.
a(10) = 12 as a(9) = 3 which has two divisors, and the closest two unvisited squares around 3 are 12 and 14. Both have more than two divisors but 12 is the smaller so it the square stepped to.
		

Crossrefs

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

Previous Showing 11-18 of 18 results.