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-8 of 8 results.

A265414 a(n) = point where A260643 for the first time obtains value n.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 11, 18, 20, 24, 26, 30, 33, 38, 42, 44, 56, 58, 64, 66, 80, 92, 100, 102, 120, 122, 134, 141, 154, 166, 168, 198, 200, 212, 224, 258, 260, 274, 276, 308, 318, 344, 380, 382, 392, 394, 417, 447, 466, 486, 488, 494, 537, 568, 588, 604, 633, 654, 702, 704, 731, 760, 812, 814, 870, 872, 904, 932, 963, 994, 1026
Offset: 1

Views

Author

Antti Karttunen, Dec 09 2015

Keywords

Comments

Also positions of records in A260643.

Crossrefs

Formula

Other identities. For all n >= 1:
A260643(a(n)) = n. [The sequence gives the first position where n occurs in A260643.]

A265415 Positions of ones in A260643.

Original entry on oeis.org

1, 10, 21, 31, 37, 101, 119, 157, 197, 273, 325, 381, 485, 553, 677, 703, 871, 931, 1123, 1191, 1297, 1483, 1561, 1765, 1893, 2026, 2353, 2402, 2757, 2810, 2917, 3081, 3193, 3250, 3365, 3661, 3716, 3783, 4161, 4359, 4693, 4901, 5257, 5477, 5853, 6085, 6481
Offset: 1

Views

Author

Antti Karttunen, Dec 09 2015

Keywords

Crossrefs

A265579 a(n) = A260643(n) - 1.

Original entry on oeis.org

0, 1, 2, 3, 1, 4, 2, 5, 6, 0, 7, 6, 3, 7, 4, 5, 3, 8, 6, 9, 0, 8, 7, 10, 2, 11, 10, 9, 11, 12, 0, 11, 13, 8, 9, 13, 0, 14, 5, 12, 1, 15, 2, 16, 10, 12, 4, 13, 1, 10, 5, 13, 12, 8, 14, 17, 1, 18, 4, 14, 15, 3, 16, 19, 1, 20, 2, 17, 15, 16, 4, 19, 3, 18, 5, 15
Offset: 1

Views

Author

Peter Kagey, Dec 10 2015

Keywords

Comments

Analogous to A260643 but with nonnegative integers instead of positive integers.

Crossrefs

Cf. A260643.

Formula

a(n) = A260643(n) - 1.

A265410 a(n) = one-based index to the nearest horizontally or vertically adjacent inner neighbor in square-grid spirals, and to the nearest diagonally adjacent inner neighbor when n is one of the corner cases A033638.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 09 2015

Keywords

Comments

By convention: a(1) = 0 because as 1 is a starting point of such spirals, it has no "inner neighbors" for itself.
Each n occurs A265411(n) times.

Examples

			We arrange natural numbers as a counterclockwise spiral into the square grid in the following manner (here A stands for 10, B for 11 and C for 12). The first square corresponds with n, and the second square with the value of a(n):
                    55433
            543C    51113C
            612B    61012B
            789A    71122A
                    7789AA
-
For each n > 1, we look for the nearest horizontally or vertically adjacent neighbor of n towards the center that is not n-1, which will then be value of a(n) [e.g., it is 1 for 4, 6 and 8, while it is 2 for 9 and 11 and 3 for 12] unless n is in the corner (one of the terms of A033638), in which case the value is the nearest diagonally adjacent neighbor towards the center.
		

Crossrefs

One more than A265409(n-1).
Cf. A265400 (a variant).
Cf. A265411, A265412, A265413 (positions of records, i.e., where value increases).

Formula

a(1) = 0; for 1 < n < 8, a(n) = 1 and for n >= 8: if either A240025(n-1) or A240025(n-2) is not zero [when n or n-1 is in A033638], then a(n) = a(n-1), otherwise, a(n) = 1 + a(n-1).
a(1) = 0; for 1 < n < 8, a(n) = 1 and for n >= 8: a(n) = a(n-1) + (1-A240025(n-1))*(1-A240025(n-2)). [The same formula in a more compact form.]
Other identities. For all n >= 0:
a(A265413(n)) = n. [Sequence is the least monotonic left inverse of A265413.]
a(A265412(n)) = n. [Also inverse of A265412.]

A265400 a(n) = one-based index to the nearest horizontally or vertically adjacent inner neighbor in square-grid spirals, or 0 if n is one of the corner cases A033638.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 09 2015

Keywords

Comments

By convention we set a(1) = 0, because as 1 is a starting point of such spirals, it has no "inner neighbors" for itself.
This sequence is useful when constructing spiral-based sequences like A260643.

Examples

			We arrange natural numbers as a counterclockwise spiral into the square grid in the following manner (here A stands for 10, B for 11 and C for 12). The first square corresponds with n, and the second square with the value of a(n):
                    05430
            543C    50103
            612B    61002
            789A    70120
                    0789A0
-
For each n > 1, we look for the nearest horizontally or vertically adjacent neighbor of n towards the center that is not n-1, which will then be value of a(n) [e.g., it is 1 for 4, 6 and 8, while it is 2 for 9 and 11 and 3 for 12] unless no such additional neighbor exists, in which case a(n) = 0 (this occurs when n is one of the A033638, Quarter-squares plus 1).
		

Crossrefs

Cf. A000035, A000267, A033638 (positions of zeros), A240025, A260643.
Cf. A265410 (a variant).

Formula

If A240025(n-1) = 1 [when n is in A033638], then a(n) = 0, otherwise a(n) = A265410(n).
a(1) = a(2) = 0. If 3 <= n <= 8, then a(n) = 1 - (n mod 2), and for n >= 8, if A240025(n-1) is not zero [when n is in A033638], then a(n) = 0, otherwise, if A240025(n-2) is not zero [when n is one more than some term of A033638], then a(n) = A033638(A000267(n)-4), otherwise, a(n) = 1 + a(n-1).

A338642 Square spiral of smallest distinct positive integers starting at 1 such that the four sums of each term with its four nearest neighbors are composite numbers.

Original entry on oeis.org

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

Views

Author

Eric Angelini and Scott R. Shannon, Apr 21 2021

Keywords

Examples

			The square spiral starts:
.
     38--36--34--35--33--30--32
      |                       |
     39  16--18--15--13--14  31
      |   |               |   |
     37  19   2---7---5  10  29
      |   |   |       |   |   |
     40  17   8   1---3  12  27
      |   |   |           |   |
     41  21   4--11---9---6  28
      |   |                   |
     43  23--22--24--25--20--26
      |
     42--45--46--44--47--48--50..
.
a(2) = 3 as a(1) + 3 = 1 + 3 = 4, the smallest possible composite number.
a(3) = 5 as a(2) + 5 = 3 + 5 = 8. Note a(3) cannot be 2 or 4 as when these are added to 3 the result is a prime number.
a(4) = 7 as a(3) + 7 = 5 + 7 = 12, and a(1) + 7 = 1 + 7 = 8, both being composite.
a(9) = 9 as a(8) + 9 = 11 + 9 = 20, and a(2) + 9 = 3 + 9 = 12, both being composite.
		

Crossrefs

Cf. A338644 (sum to primes), A002808, A063826, A260643, A334742, A307834, A338221.

A272573 Start a spiral of numbers on a hexagonal tiling, with the initial hexagon as a(1) = 1. a(n) is the smallest positive integer not equal to or previously adjacent to its neighbors.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 4, 6, 8, 5, 9, 8, 10, 2, 11, 3, 10, 11, 12, 13, 9, 12, 7, 13, 14, 1, 11, 13, 15, 9, 16, 14, 7, 16, 17, 15, 1, 16, 18, 7, 17, 19, 20, 1, 17, 18, 19, 9, 21, 3, 20, 10, 22, 4, 15, 21, 23, 5, 22, 23, 10, 21, 6, 22, 24, 25, 2, 14, 22, 25, 26, 3
Offset: 1

Views

Author

Peter Kagey, May 03 2016

Keywords

Comments

This is the hexagonal analog to A260643.

Examples

			Illustration of a(1) through a(8) and a(13):
    |     |     |      |       |       |       |        |     | 8 9 5
    |     |  3  | 4 3  |  4 3  |  4 3  |  4 3  |  4 3   |     |  4 3 8
  1 | 1 2 | 1 2 |  1 2 | 5 1 2 | 5 1 2 | 5 1 2 | 5 1 2  | ... | 5 1 2 6
    |     |     |      |       |  6    |  6 7  |  6 7 4 |     |  6 7 4
		

Crossrefs

A338644 Square spiral of smallest distinct positive integers starting at 1 such that the four sums of each term with its four nearest neighbors is a prime number.

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 5, 12, 11, 8, 9, 10, 13, 16, 15, 22, 19, 24, 17, 14, 23, 18, 25, 36, 35, 26, 21, 20, 27, 34, 33, 28, 31, 52, 37, 42, 29, 54, 43, 30, 53, 44, 39, 50, 89, 48, 61, 66, 41, 32, 47, 62, 51, 46, 55, 76, 63, 38, 45, 58, 49, 60, 67, 72, 59, 68, 83, 84, 73, 78, 95, 98, 65, 74, 57, 92
Offset: 1

Views

Author

Scott R. Shannon and Eric Angelini, Apr 21 2021

Keywords

Examples

			The square spiral starts:
.
     29--42--37--52--31--28--33
      |                       |
     54  19--22--15--16--13  34
      |   |               |   |
     43  24   7---4---3  10  27
      |   |   |       |   |   |
     30  17   6   1---2   9  20
      |   |   |           |   |
     53  14   5--12--11---8  21
      |   |                   |
     44  23--18--25--36--35--26
      |
     39--50--89--48--61--66--41..
.
a(2) = 2 as a(1) + 2 = 1 + 2 = 3, the smallest possible prime number.
a(3) = 3 as a(2) + 3 = 2 + 3 = 5, the next smallest possible prime number.
a(5) = 7 as a(4) + 7 = 4 + 7 = 11. Note a(5) cannot be 5 or 6 as when these are added to 4 the result is a composite number.
a(9) = 11 as a(8) + 11 = 12 + 11 = 23, and a(2) + 11 = 2 + 11 = 13, both being prime.
		

Crossrefs

Cf. A338642 (sum to composites), A000040, A063826, A260643, A334742, A307834, A338221.
Showing 1-8 of 8 results.