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-20 of 21 results. Next

A307197 Fill the plane with the square spiral with cells numbered as in A275609; sequence gives the cells along the West spoke starting at the origin.

Original entry on oeis.org

0, 2, 0, 2, 0, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2
Offset: 0

Views

Author

N. J. A. Sloane, Mar 29 2019

Keywords

Comments

The Example section of A275609 shows the central portion of the spiral very clearly. The link below shows a larger portion but is harder to read.

Crossrefs

Cf. A275609.
The eight spokes starting at the origin are A307193 - A307200.

Extensions

More terms from Alois P. Heinz, Mar 30 2019

A307198 Fill the plane with the square spiral with cells numbered as in A275609; sequence gives the cells along the South-West spoke starting at the origin.

Original entry on oeis.org

0, 1, 0, 1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
Offset: 0

Views

Author

N. J. A. Sloane, Mar 29 2019

Keywords

Comments

The Example section of A275609 shows the central portion of the spiral very clearly. The link below shows a larger portion but is harder to read.

Crossrefs

Cf. A275609.
The eight spokes starting at the origin are A307193 - A307200.

Extensions

More terms from Alois P. Heinz, Mar 30 2019

A307199 Fill the plane with the square spiral with cells numbered as in A275609; sequence gives the cells along the South spoke starting at the origin.

Original entry on oeis.org

0, 3, 0, 3, 0, 3, 0, 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0
Offset: 0

Views

Author

N. J. A. Sloane, Mar 29 2019

Keywords

Comments

The Example section of A275609 shows the central portion of the spiral very clearly. The link below shows a larger portion but is harder to read.

Crossrefs

Cf. A275609.
The eight spokes starting at the origin are A307193 - A307200.

Extensions

More terms from Alois P. Heinz, Mar 30 2019

A355270 Lexicographically earliest sequence of positive integers on a square spiral such that the sum of adjacent pairs of numbers within each row, column and diagonal is distinct in that row, column and diagonal.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 2, 4, 3, 3, 4, 4, 3, 5, 4, 2, 4, 3, 5, 4, 4, 2, 3, 6, 4, 6, 5, 7, 6, 2, 6, 3, 2, 5, 8, 4, 3, 6, 6, 7, 3, 5, 7, 6, 8, 8, 7, 1, 2, 7, 5, 1, 2, 5, 8, 6, 4, 8, 5, 6, 9, 7, 1, 4, 10, 1, 1, 6, 3, 9, 12, 5, 1, 7, 2, 1, 6, 4, 1, 13, 6, 4, 7, 9, 12, 10, 7, 11, 1, 5, 2, 10, 7, 4, 5, 8
Offset: 1

Views

Author

Scott R. Shannon, Jun 26 2022

Keywords

Comments

In the first 2 million terms the largest number is 1959, while the number 1, the most commonly occurring number, appears 10893 times. See the linked images.

Examples

			The spiral begins:
.
                                .
    4---8---5---2---3---6---2   :
    |                       |   :
    3   2---4---5---3---4   6   5
    |   |               |   |   |
    6   4   2---1---1   4   7   2
    |   |   |       |   |   |   |
    6   3   2   1---1   3   5   1
    |   |   |           |   |   |
    7   5   3---2---4---3   6   5
    |   |                   |   |
    3   4---4---2---3---6---4   7
    |                           |
    5---7---6---8---8---7---1---2
.
a(25) = 6 as when a(25) is placed, at coordinate (2,-2) relative to the starting square, its adjacent squares are a(10) = 3, a(9) = 4, a(24) = 3. The sums of adjacent pairs of numbers in a(25)'s column are 3 + 3 = 6, 3 + 4 = 7, 4 + 4 = 8, in its northwest diagonal are 4 + 1 = 5, 1 + 2 = 3, 2 + 2 = 4, and in its row are 3 + 2 = 5, 2 + 4 = 6, 4 + 4 = 8. Setting a(25) to 1 would create a sum of 5 with its diagonal neighbor 4, but 5 has already occurred as a sum on this diagonal. Similarly numbers 2, 3, 4 and 5 can be eliminated as they create sums with the three adjacent numbers, 3, 4, and 3, which have already occurred along the corresponding column, diagonal or row. This leaves 6 as the smallest number which creates new sums, namely 9, 10 and 9, with its three neighbors that have not already occurred along the corresponding column, diagonal and row.
		

Crossrefs

A278354 Number of neighbors of each new term in a square spiral.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 2, 4, 3, 2, 4, 3, 2, 4, 4, 3, 2, 4, 4, 3, 2, 4, 4, 4, 3, 2, 4, 4, 4, 3, 2, 4, 4, 4, 4, 3, 2, 4, 4, 4, 4, 3, 2, 4, 4, 4, 4, 4, 3, 2, 4, 4, 4, 4, 4, 3, 2, 4, 4, 4, 4, 4, 4, 3, 2, 4, 4, 4, 4, 4, 4, 3, 2, 4, 4, 4, 4, 4, 4, 4, 3, 2, 4, 4, 4, 4, 4, 4, 4, 3, 2, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 4, 4, 4, 4
Offset: 1

Views

Author

Omar E. Pol, Nov 19 2016

Keywords

Comments

Here the "neighbors" of a(n) are defined to be the adjacent elements to a(n) in the same row, column or diagonals, that are present in the spiral when a(n) is the new element of the sequence in progress.
For the same idea but for a right triangle see A278317; for an isosceles triangle see A275015; for a square array see A278290; and for a hexagonal spiral see A047931.

Examples

			Illustration of initial terms as a spiral (n = 1..169):
.
.     2 - 3 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 2
.     |                                               |
.     4   2 - 3 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 2   3
.     |   |                                       |   |
.     4   4   2 - 3 - 4 - 4 - 4 - 4 - 4 - 4 - 2   3   4
.     |   |   |                               |   |   |
.     4   4   4   2 - 3 - 4 - 4 - 4 - 4 - 2   3   4   4
.     |   |   |   |                       |   |   |   |
.     4   4   4   4   2 - 3 - 4 - 4 - 2   3   4   4   4
.     |   |   |   |   |               |   |   |   |   |
.     4   4   4   4   4   2 - 3 - 2   3   4   4   4   4
.     |   |   |   |   |   |       |   |   |   |   |   |
.     4   4   4   4   4   3   0 - 1   4   4   4   4   4
.     |   |   |   |   |   |           |   |   |   |   |
.     4   4   4   4   3   2 - 4 - 3 - 2   4   4   4   4
.     |   |   |   |   |                   |   |   |   |
.     4   4   4   3   2 - 4 - 4 - 4 - 3 - 2   4   4   4
.     |   |   |   |                           |   |   |
.     4   4   3   2 - 4 - 4 - 4 - 4 - 4 - 3 - 2   4   4
.     |   |   |                                   |   |
.     4   3   2 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 3 - 2   4
.     |   |                                           |
.     3   2 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 3 - 2
.     |
.     2 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 3
.
		

Crossrefs

Programs

  • Maple
    0,1,seq(op([2,4$floor(i/2),3]),i=0..30); # Robert Israel, Nov 22 2016

Formula

From Robert Israel, Nov 22 2016: (Start)
a(n) = 3 if n>=4 is in A002620.
a(n) = 2 if n>=2 is in A033638.
Otherwise, a(n) = 4 if n > 2. (End)

A355271 Lexicographically earliest sequence of positive integers on a square spiral such that the product of adjacent pairs of numbers within each row, column and diagonal is distinct in that row, column and diagonal.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 2, 4, 3, 3, 4, 2, 3, 4, 4, 5, 3, 2, 5, 4, 3, 5, 4, 2, 2, 3, 5, 2, 2, 4, 2, 3, 5, 4, 6, 3, 1, 1, 5, 5, 4, 1, 1, 6, 6, 2, 5, 6, 4, 5, 1, 1, 6, 4, 7, 5, 4, 1, 5, 3, 6, 2, 3, 1, 1, 3, 7, 6, 2, 7, 4, 5, 7, 3, 6, 1, 1, 4, 3, 1, 5, 2, 1, 1, 6, 5, 7, 1, 5, 3, 3, 5, 1, 1, 3, 7, 4, 6
Offset: 1

Views

Author

Scott R. Shannon, Jun 26 2022

Keywords

Comments

In the first 2 million terms the largest number is 257, while the number 37, the most commonly occurring number, appears 43477 times. Prime numbers appear more often than the composites. See the linked images.

Examples

			The spiral begins:
.
                                .
    3---6---4---5---3---2---4   :
    |                       |   :
    1   5---4---4---3---2   2   4
    |   |               |   |   |
    1   3   2---1---1   4   2   6
    |   |   |       |   |   |   |
    5   2   2   1---1   3   5   1
    |   |   |           |   |   |
    5   5   3---2---4---3   3   1
    |   |                   |   |
    4   4---3---5---4---2---2   5
    |                           |
    1---1---6---6---2---5---6---4
.
a(25) = 2 as when a(25) is placed, at coordinate (2,-2) relative to the starting square, its adjacent squares are a(10) = 3, a(9) = 4, a(24) = 4. The products of adjacent pairs of numbers in a(25)'s column are 3 * 3 = 9, 3 * 4 = 12, 4 * 2 = 8, in its north-west diagonal are 4 * 1 = 4, 1 * 2 = 2, 2 * 5 = 10, and in its row are 4 * 5 = 20, 5 * 3 = 15, 3 * 4 = 12. Setting a(25) to 1 would create a product of 4 with its diagonal neighbor 4, but 4 has already occurred as a product on this diagonal. Similarly numbers 3, 4 and 5 would not be possible as they would create products with the three adjacent numbers, 3, 4, and 4, which have already occurred along the corresponding column, diagonal or row. But 2 is smaller and creates new products, namely 6, 8 and 8, with its three neighbors that have not already occurred along the corresponding column, diagonal and row.
		

Crossrefs

A274917 Square spiral in which each new term is the least positive integer distinct from its (already assigned) eight neighbors.

Original entry on oeis.org

1, 2, 3, 4, 2, 3, 2, 4, 3, 1, 4, 1, 2, 5, 1, 3, 1, 4, 1, 4, 1, 3, 1, 2, 4, 2, 3, 2, 3, 4, 1, 3, 4, 2, 4, 2, 3, 5, 2, 3, 2, 3, 2, 4, 2, 4, 3, 1, 3, 1, 4, 1, 4, 1, 2, 3, 2, 4, 2, 1, 3, 1, 5, 1, 2, 4, 1, 4, 1, 4, 1, 4, 1, 3, 1, 3, 1, 2, 4, 2, 4, 2, 3, 2, 3, 2, 3, 4, 1, 4, 1, 3, 1, 3, 4, 2, 4, 2, 3, 4, 1, 3, 5, 2, 3
Offset: 0

Views

Author

Omar E. Pol, Jul 11 2016

Keywords

Comments

The largest element is 5 and it is also the element with lower density in the spiral.
See A275609 for proof that 5 is maximal and for further comments. - N. J. A. Sloane, Mar 24 2019

Examples

			Illustration of initial terms as a spiral (n = 0..168):
.
.     2 - 3 - 2 - 1 - 5 - 1 - 3 - 1 - 2 - 4 - 2 - 4 - 2
.     |                                               |
.     4   1 - 4 - 3 - 2 - 4 - 2 - 4 - 3 - 1 - 3 - 1   3
.     |   |                                       |   |
.     2   3   2 - 1 - 5 - 1 - 3 - 1 - 2 - 4 - 2   4   2
.     |   |   |                               |   |   |
.     1   5   4   3 - 2 - 4 - 2 - 4 - 3 - 1   3   1   3
.     |   |   |   |                       |   |   |   |
.     4   2   1   5   1 - 3 - 1 - 5 - 2   4   2   4   2
.     |   |   |   |   |               |   |   |   |   |
.     1   3   4   2   4   2 - 4 - 3   1   3   1   3   1
.     |   |   |   |   |   |       |   |   |   |   |   |
.     4   2   1   3   1   3   1 - 2   4   2   4   2   4
.     |   |   |   |   |   |           |   |   |   |   |
.     1   3   4   2   4   2 - 4 - 3 - 1   3   1   3   1
.     |   |   |   |   |                   |   |   |   |
.     4   2   1   3   1 - 3 - 1 - 2 - 4 - 2   4   2   4
.     |   |   |   |                           |   |   |
.     1   3   4   2 - 4 - 2 - 4 - 3 - 1 - 3 - 1   3   1
.     |   |   |                                   |   |
.     4   2   1 - 3 - 1 - 3 - 1 - 2 - 4 - 2 - 4 - 2   4
.     |   |                                           |
.     1   3 - 4 - 2 - 4 - 2 - 4 - 3 - 1 - 3 - 1 - 3 - 1
.     |
.     2 - 5 - 1 - 3 - 1 - 3 - 1 - 2 - 4 - 2 - 4 - 2 - 4
.
a(13) = 5 is the first "5" in the sequence and its four neighbors are 4 (southwest), 3 (south), 1 (southeast) and 2 (east) when a(13) is placed in the spiral.
a(157) = 5 is the 6th "5" in the sequence and it is also the first "5" that is below the NE-SW main diagonal of the spiral (see the second term in the last row of the above diagram).
		

Crossrefs

Cf. A274913, A274921, A275609, A278354 (number of neighbors).

Formula

a(n) = A275609(n) + 1. - Omar E. Pol, Nov 14 2016

A357985 Counterclockwise square spiral constructed using the integers so that a(n) plus all other numbers currently visible from the current number equals n; start with a(0) = 0.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 3, -1, 6, -2, -1, 0, 1, 9, -8, 15, -5, -7, -10, 14, -29, 58, -78, 101, -118, 150, -61, 309, -307, 553, -494, -186, -644, 315, -1177, 731, -1458, 3480, -5183, 7096, -8328, 9735, -10882, 7200, -29452, 31322, -52670, 51401, -65210, 61001, 11318, 135012, -109687, 259226, -221542
Offset: 0

Views

Author

Scott R. Shannon, Oct 23 2022

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 magnitude of the numbers grow surprisingly quickly, e.g., a(150) = -4346232663618226. The only known terms that equal zero are a(0) and a(11); it is unknown whether more exist or if all integers eventually appear.

Examples

			The spiral begins:
.
                                 .
                                 .
    -5....15...-8....9.....1    553
     |                     |     |
    -7    2....1.....1     0   -307
     |    |          |     |     |
   -10    1    0.....1    -1    309
     |    |                |     |
    14    3...-1.....6... -2    -61
     |                           |
   -29...58...-78...101...-118...150
.
.
a(6) = 3 as from square 6, at (-1,1) relative to the starting square, the numbers currently visible are 1 (at -1,0), 0 (at 0,0), 1 (at 0,1), and 1 (at 1,0). These four numbers sum to 3, so a(6) = 3 so that 3 + 3 = 6.
a(7) = -1 as from square 7, at (0,-1) relative to the starting square, the numbers currently visible are 3 (at -1,-1), 1 (at -1,0), 2 (at -1,1), 0 (at 0,0), 1 (at 1,1), and 1 (at 1,0). These six numbers sum to 8, so a(7) = -1 so that -1 + 8 = 7.
		

Crossrefs

A357991 Lexicographically earliest counterclockwise square spiral constructed using the nonnegative integers so that a(n) plus all other numbers currently visible from the current number form a distinct sum; start with a(0) = 0.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 3, 0, 4, 0, 0, 0, 1, 5, 0, 6, 0, 0, 1, 0, 2, 4, 0, 7, 0, 8, 0, 7, 0, 7, 0, 0, 0, 0, 0, 0, 0, 12, 0, 13, 0, 16, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 12, 0, 22, 0, 19, 0, 20, 1, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 25, 0, 24, 0, 20, 1, 26, 0, 28, 0, 26, 0, 31, 0, 31, 0, 0, 0, 0
Offset: 0

Views

Author

Scott R. Shannon, Oct 23 2022

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.
In the first 50000 terms the smallest number that has not appeared is 9; it is unknown if all the positive numbers eventually appear.

Examples

			The spiral begins:
.
                       .
                       .
   0---6---0---5---1   7
   |               |   |
   0   2---1---1   0   0
   |   |       |   |   |
   1   1   0---1   0   7
   |   |           |   |
   0   3---0---4---0   0
   |                   |
   2---4---0---7---0---8
.
.
a(6) = 3 as from square 6, at (-1,-1) relative to the starting square, the numbers currently visible are 1 (at -1,0), 0 (at 0,0), 1 (at 1,0), and 1 (at 0,1). These three numbers sum to 3, so a(6) = 3 so that 3 + 3 = 6, the smallest sum that has not previous occurred.
a(8) = 4 as from square 8, at (1,-1) relative to the starting square, the numbers currently visible are 0 (at 0,-1), 1 (at -1,0), 0 (at 0,0), 1 (at 1,0), and 1 (at 0,1). These five numbers sum to 3, so a(8) = 4 so that 3 + 4 = 7, the smallest sum that has not previous occurred. Note that a(7) = 0 and forms a sum of 8.
		

Crossrefs

A355314 Lexicographically earliest sequence of positive integers on a square spiral such that the difference between all orthogonally adjacent pairs of numbers is distinct.

Original entry on oeis.org

0, 0, 1, 3, 7, 12, 1, 7, 15, 1, 10, 23, 0, 17, 35, 54, 0, 27, 48, 72, 0, 26, 55, 83, 31, 0, 34, 69, 106, 39, 1, 41, 83, 126, 1, 45, 91, 140, 77, 128, 2, 57, 1, 61, 119, 183, 1, 93, 158, 1, 74, 143, 218, 0, 115, 192, 0, 79, 160, 244, 2, 87, 174, 1, 89, 185, 1, 166, 6, 101, 198, 296, 0, 101, 203, 1
Offset: 0

Views

Author

Scott R. Shannon, Jun 28 2022

Keywords

Comments

For larger n the sequences typically consists of a repeating pattern of three values - the first one is small, less than 5, a second larger value, and then a third even larger value, typically around double the previous value. However this pattern is occasionally broken by a fourth or fifth larger value which shifts the position of the subsequent repeating block of three values. This leads to the overall spiral pattern showing a uniform pattern of numbers crossed by random zig-zag lines of values not following the three-value pattern. See the linked color image.

Examples

			The spiral begins:
.
                                .
   91--45---1--126-83--41---1   :
    |                       |   :
   140  0--54--35--17---0  39  115
    |   |               |   |   |
   77  27   7---3---1  23  106  0
    |   |   |       |   |   |   |
   128 48  12   0---0  10  69  218
    |   |   |           |   |   |
    2  72   1---7--15---1  34  143
    |   |                   |   |
   57   0--26--55--83--31---0  74
    |                           |
    1--61--119-183--1--93--158--1
.
.
a(8) = 15 as when a(8) is placed, at coordinate (1,-1) relative to the starting square, its two orthogonally adjacent squares are a(1) = 0 and a(7) = 7. The ten previously occurring differences between all orthogonally adjacent pairs up to a(7) are 0, 1, 2, 3, 4, 5, 6, 7, 11, 12. The lowest unused difference is 8 thus a(8) = 15 can be chosen as it results in differences with its two orthogonal neighbors of 15 - 7 = 8 and 15 = 0 = 15, neither of which has previously occurred.
		

Crossrefs

Previous Showing 11-20 of 21 results. Next