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-10 of 13 results. Next

A337115 Square spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the four integers forming any 2 X 2 square add up to a square.

Original entry on oeis.org

0, 1, 2, 6, 3, 7, 4, 5, 10, 8, 17, 16, 9, 22, 19, 21, 11, 14, 12, 13, 15, 32, 23, 26, 20, 18, 35, 40, 27, 29, 24, 38, 31, 28, 53, 36, 25, 49, 47, 48, 71, 45, 30, 54, 43, 46, 74, 76, 55, 33, 63, 80, 41, 61, 52, 39, 34, 72, 62, 65, 101, 107, 60, 75, 37, 59, 92, 68, 93, 44, 96
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Aug 16 2020

Keywords

Comments

This is (by definition) the lexicographically earliest permutation of the nonnegative integers with this property.

Examples

			The four integers inside each of the four 2 X 2 squares that contain the initial 0 add up to a square: 0 + 1 + 2 + 6 = 9, 0 + 6 + 3 + 7 = 16, 0 + 7 + 4 + 5 = 16, 0 + 5 + 10 + 1 = 16. This is true for any 2 X 2 square on the (infinite) grid: the upper right corner below adds up to  81 (= 20 + 18 + 35 + 8), for instance.
.
     15--32--23--26--20--18
      |                   |
     13   4---5--10---8  35
      |   |           |   .
     12   7   0---1  17   .
      |   |       |   |   .
     14   3---6---2  16
      |               |
     11--21--19--22---9
.
		

Crossrefs

Cf. A214176, A337116 (same idea, with primes rather than squares), A337117 (with palindromes), A337368 (with pandigitals).

A354441 Lexicographically earliest sequence of distinct positive integers on a square spiral such that any 3X3 square of numbers sums to a prime.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 29 2022

Keywords

Comments

See A354442 for the successive prime sums formed by each completed 3X3 square of numbers.

Examples

			The spiral begins
                                .
                                .
   32--36--41--37--33--31--29  57
    |                       |   |
   34  15--16--20--14--12  30  51
    |   |               |   |   |
   43  17   5---4---3  13  28  56
    |   |   |       |   |   |   |
   38  19   6   1---2  10  27  50
    |   |   |           |   |   |
   40  22   7---8--11---9  24  54
    |   |                   |   |
   52  18--21--25--26--35--23  49
    |                           |
   39--42--66--48--45--44--46--47
.
.
a(9) = 11 as this completes a 3X3 square of numbers 5,4,3,6,1,2,7,8,11, which sum to 47, a prime, and 11 is the smallest unused number to form a prime sum.
a(12) = 13 as this completes a 3X3 square of numbers 8,11,9,1,2,10,4,3,13, which sum to 61, a prime, and 13 is the smallest unused number to form a prime sum.
		

Crossrefs

A337117 Spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the four integers forming any 2 X 2 square add up to a palindrome.

Original entry on oeis.org

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

Views

Author

Eric Angelini and Jean-Marc Falcoz, Aug 16 2020

Keywords

Comments

This is the lexicographically earliest permutation of the nonnegative integers with this property.

Examples

			The four integers inside each of the four 2 X 2 squares that contain 0 sum up to a palindrome: 0+1+2+3=6 / 0+3+4+15=22 / 0+15+5+13=33 / 0+13+8+1=22. This is true for any 2 X 2 square picked up on the (infinite) grid: the upper right corner below sums up to 88 for instance (17+22+43+6).
.
     14--16--32--24--17--22
      |                   |
     20   5--13-- 8---6  43
      |   |           |
     26  15   0---1   7
      |   |       |   |
     21   4---3---2  12
      |               |
     11--19--18--10-- 9
.
		

Crossrefs

Cf. A214176, A337116 (same idea, with primes instead of palindromes), A337115 (squares instead of palindromes).

A354372 Square spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the digits of the four integers forming any 2 X 2 square add up to a square.

Original entry on oeis.org

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

Views

Author

Eric Angelini and Carole Dubois, May 24 2022

Keywords

Comments

This is the earliest permutation of the nonnegative integers with this property.

Examples

			The spiral begins:
.
     14--18--34--19--40--15
      |                   |
     25   4---5--12---8  43
      |   |           |   .
     16   7   0---1  13   .
      |   |       |   |   .
     17   3---6---2   9
      |               |
     11--21--31--22--10
.
The digits of the four integers inside each of the four 2 X 2 squares that contain the initial 0 add up to a square: 0 + 1 + 2 + 6 = 9, 0 + 6 + 3 + 7 = 16, 0 + 7 + 4 + 5 = 16, 0 + 5 + (1+2) + 1 = 9. This is true for any 2 X 2 square on the (infinite) grid; the upper right corner adds up to 25, for instance: (4+0) + (1+5) + 8 + (4+3) = 25; etc.
		

Crossrefs

A354435 Lexicographically earliest sequence of distinct positive integers on a square spiral such that any 3 X 3 square of numbers sums to a prime, and these primes are distinct.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 28 2022

Keywords

Comments

This sequence uses the same rules as A354453 but here the sum is over every 3 X 3 square of numbers. The terms are widely spread out as in A354453 but here they display an unusual concentration in density along at least three bands that wander between the upper and lower bounds of the terms. See the linked images. The reason for this behavior is unknown.
See A354461 for the successive prime sums formed by each completed 3 X 3 square of numbers.

Examples

			The spiral begins
                                .
                                .
   32--31--48--35--34--28--27  51
    |                       |   |
   33  15--16--20--14--12  30  53
    |   |               |   |   |
   42  17   5---4---3  13  36  67
    |   |   |       |   |   |   |
   40  19   6   1---2  10  29  63
    |   |   |           |   |   |
   41  22   7---8--11---9  24  60
    |   |                   |   |
   37  18--21--25--26--39--23  50
    |                           |
   38--43--44--45--54--46--49--47
.
.
a(9) = 11 as this completes a 3 X 3 square of numbers 5,4,3,6,1,2,7,8,11 which sum to 47, a prime, and 11 is the smallest unused number to form a prime sum that has not occurred before.
a(25) = 39 as this completes a 3 X 3 square of numbers 1,2,10,8,11,9,25,26,39 which sum to 131, a prime, and 39 is the smallest unused number to form a prime sum that has not occurred before. Note that 35 would generate a square sum of 127, also a prime, but 127 was formed previously by the 3 X 3 square 19,6,1,22,7,8,18,21,25 so cannot be used. This is the first term to differ from A354441.
		

Crossrefs

A354442 The primes sums formed for each completed 3 X 3 square of numbers in A354441.

Original entry on oeis.org

47, 61, 79, 71, 103, 89, 127, 107, 127, 167, 127, 139, 193, 167, 173, 191, 239, 193, 197, 223, 307, 257, 257, 251, 263, 331, 281, 271, 277, 307, 379, 337, 347, 359, 349, 353, 431, 379, 379, 397, 409, 439, 499, 449, 439, 463, 457, 461, 479, 569, 499, 491, 509, 521, 523, 557, 643, 557, 563, 599, 613
Offset: 1

Views

Author

Scott R. Shannon, May 29 2022

Keywords

Comments

See A354441 for further details.
In the first one million terms the most frequently occurring prime sum is 8986531, which occurs twenty-eight times. It is unknown if the maximum number of times a prime sum can occur is finite or unbounded.

Examples

			The first prime sum is 47, which is the sum of the innermost nine values 1,2,3,4,5,6,7,8,11 which form the 3 X 3 square centered at (0,0) in the square spiral shown in A354441.
The second prime sum is 61, which is the sum of the nine values 1,2,3,4,8,9,10,11,13 which form the 3 X 3 square centered at (1,0) in the square spiral shown in A354441.
		

Crossrefs

A354453 Lexicographically earliest sequence of distinct positive integers on a square spiral such that any 2 X 2 square of numbers sums to a prime, and that prime is unique for all such squares. Start with a(1) = 0.

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 5, 8, 14, 7, 9, 17, 10, 12, 19, 21, 11, 18, 16, 32, 13, 23, 25, 20, 30, 15, 27, 40, 31, 43, 22, 28, 39, 37, 36, 41, 24, 51, 57, 48, 35, 69, 26, 49, 66, 53, 65, 58, 76, 29, 61, 88, 38, 90, 33, 113, 34, 54, 123, 67, 86, 74, 100, 98, 42, 75, 91, 70, 96, 102, 71, 117, 44, 106, 126
Offset: 1

Views

Author

Scott R. Shannon, May 30 2022

Keywords

Comments

This is a variation of A337116 where the same rules apply except that the primes generated by all 2 X 2 square sums must be unique. This leads to the terms having a far greater variation in value while being concentrated along a central line which shows wave-like variations in density. See the linked image. The reason for this behavior is unknown.
See A354460 for the successive prime sums formed by each completed 2 X 2 square of numbers.

Examples

			The spiral begins
                                .
                                .
   24--41--36--37--39--28--22 113
    |                       |   |
   51  11--21--19--12--10  43  33
    |   |               |   |   |
   57  18   3---4---2  17  31  90
    |   |   |       |   |   |   |
   48  16   6   0---1   9  40  38
    |   |   |           |   |   |
   35  32   5---8--14---7  27  88
    |   |                   |   |
   69  13--23--25--20--30--15  61
    |                           |
   26--49--66--53--65--58--76--29
.
.
a(9) = 14 as this completes a 2 X 2 square of numbers 0,1,8,14 which sum to 23, a prime, and 14 is the smallest unused number to form a prime sum that has not occurred before. Note that 10 is unused and would form a prime sum of 19, see A337116, but 19 was formed previously by the square 6,0,5,8, so cannot be used. This is the first term to differ from A337116.
		

Crossrefs

A354373 Square spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the digits of the four integers forming any 2 X 2 square add up to a prime.

Original entry on oeis.org

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

Views

Author

Eric Angelini and Carole Dubois, May 24 2022

Keywords

Comments

This is the earliest permutation of the nonnegative integers with this property.

Examples

			The spiral begins:
.
     17--25--27--19--22--20
      |                   |
     21   5---8--11---7  24
      |   |           |   .
     23   6   0---1   9   .
      |   |       |   |   .
     18   3---4---2  10
      |               |
     16--13--15--14--12
.
The digits of the four integers inside each of the four 2 X 2 squares that contain the initial 0 add up to a prime: 0 + 1 + 2 + 4 = 7, 0 + 4 + 3 + 6 = 13, 0 + 6 + 5 + 8 = 19, 0 + 8 + (1+1) + 1 = 11. This is true for any 2 X 2 square on the (infinite) grid; the upper right corner adds up to 19, for instance: (2+2) + (2+0) + (2+4) + 7 = 19; etc.
		

Crossrefs

A353591 Lexicographically earliest permutation of the nonnegative integers filling an infinite square array by falling antidiagonals so that the elements on any 2 X 2 square sum to a prime.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, May 29 2022

Keywords

Comments

In A337116 the infinite 2D lattice is filled along a square spiral satisfying the same constraint of 2 X 2 squares adding up to primes.

Examples

			The square array starts
   0   1   3   6  10  13  19  24  36  42  ...
   2   4   9  11  14  22  35  49  48  ...
   5   8  16  23  31  30  40  43  ...
   7  17  18  26  27  39  54  ...
  12  25  29  28  46  45  ...
  15  21  32  38  51  ...
  20  33  41  52  ...
  34  44  55  ...
  37  58  ...
  47  ...
  ...
a(4) is in the second row and column. It must sum up with a(0) = 0, a(1) = 1 and a(2) = 2 to a prime. The smallest possible solution is to reach the prime p = 7 with a(4) = 4.
Similarly, a(7) which is on the second row, third column, must sum up with a(1) = 1 (above to the left), a(3) = 3 (above) and a(4) = 4 (to the left) to a prime; the smallest solution is to reach the prime p = 17 using a(7) = 9.
		

Crossrefs

Cf. A000040 (the primes), A337116 (same idea with square spiral instead of array by antidiagonals), A353590 (same idea with squares instead of primes).

Programs

  • PARI
    A353591_upto(N, M=Map(), r,c, U=[-1])={vector(N, i, if(r && c, my(s=mapget(M,[r-1,c-1])+mapget(M,[r-1,c])+mapget(M,[r,c-1]), p=nextprime(s+U[1]+1)); while(setsearch(U, N=p-s), p=nextprime(p+1)), N=U[1]+1); mapput(M,[r,c], N); if(c, c--;r++, r=!c=r+1); U=setunion(U, [N]); while(#U>1 && U[2]==U[1]+1, U=U[^1]); N)}

A354374 Square spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the digits of the four integers forming any 2 X 2 square add up to a prime and those sums themselves form another infinite 2D square lattice with the same property.

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 5, 8, 11, 7, 9, 10, 12, 14, 17, 13, 15, 19, 39, 24, 16, 23, 29, 5999, 33, 18, 25, 42, 69, 699, 20, 26, 21, 999, 299, 599, 22, 28, 30, 31, 34, 38, 27, 37, 36, 40, 59, 4999, 43, 32, 35, 41, 49, 102, 47, 69999, 44, 45, 48, 99, 58, 52, 111, 689, 46, 51, 698, 79999, 9999999, 50, 68
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, May 24 2022

Keywords

Comments

This is the earliest permutation of the nonnegative integers with this property.

Examples

			The spiral begins:
.
     16--23--29-5999-33--18
      |                   |
     24   5---8--11---7  25
      |   |           |   |
     39   6   0---1   9  42
      |   |       |   |   |
     19   3---4---2  10  69
      |               |   |
     15--13--17--14--12 699
                          |
        ... 999--21--26--20
.
The digits of the four integers inside each of the four 2 X 2 squares that contain the initial 0 add up to a prime: 0 + 1 + 2 + 4 = 7, 0 + 4 + 3 + 6 = 13, 0 + 6 + 5 + 8 = 19, 0 + 8 + (1+1) + 1 = 11. This is true for any 2 X 2 square on the (infinite) grid; the upper right corner adds up to the prime 29, for instance: (3+3) + (1+8) + (2+5) + 7 = 29; etc.
All those successive "prime sums" form the hereunder "second-level" spiral:
.
     37--19--43 ...
      |
     43  11--19--19--23
      |   |           |
     31  13   7--13  31
      |   |       |   |
     29  19--11--19  29
      |               |
     29--47--53--29--23
.
Though the terms of this new spiral are not distinct, the sum of the digits inside any 2 X 2 square is prime again; the upper left 2 X 2 square produces the prime 29 = (3+7) + (1+9) + (1+1) + (4+3); the lower left 2 X 2 square produces the prime 43 = (2+9) + (1+9) + (4+7) + (2+9); the lower right 2 X 2 square produces the prime 37 = (1+9) + (2+9) + (2+3) + (2+9); the initial "center square" produces the prime 23 = 7 + (1+3) + (1+9) + (1+1); etc.
		

Crossrefs

Showing 1-10 of 13 results. Next