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 12 results. Next

A337116 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 prime.

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 5, 8, 10, 7, 11, 9, 12, 14, 17, 13, 15, 16, 18, 24, 19, 23, 25, 28, 22, 20, 30, 31, 32, 26, 21, 38, 33, 37, 34, 27, 29, 36, 40, 35, 50, 44, 39, 47, 42, 41, 43, 46, 49, 45, 53, 48, 54, 56, 59, 51, 52, 55, 65, 57, 64, 58, 60, 63, 61, 70, 62, 73, 75, 67
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 0 sum up to a prime: 0+1+2+4=7 / 0+4+3+6=13 / 0+6+5+8=19 / 0+8+10+1=19. This is true for any 2 X 2 square picked up on the (infinite) grid: the upper right corner below sums up to the prime 79 for instance (22+20+30+7).
.
     19--23--25--28--22--20
      |                   |
     24   5---8--10---7  30
      |   |           |   .
     18   6   0---1  11   .
      |   |       |   |   .
     16   3---4---2   9   .
      |               |
     15--13--17--14--12
.
		

Crossrefs

Cf. A214176, A337115 (same idea, with squares instead of primes), A337117 (with palindromes instead of primes), A337368 (with pandigitals).

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

A337368 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 have all digits 0 through 9 (with duplicate digits allowed).

Original entry on oeis.org

0, 1, 2, 3456789, 3, 12, 4, 356789, 24, 5, 306789, 45, 6, 103789, 7, 102, 8, 45679, 80, 35679, 9, 1028, 10, 11, 306798, 13, 42, 14, 20, 13789, 15, 204, 25, 46, 3589, 467, 16, 20359, 17, 23, 41, 208, 18, 34567, 19, 34576, 289, 54, 21, 22, 4056789, 26, 305789, 36, 145, 206, 27, 3489, 67, 1389, 70, 112, 30
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Aug 25 2020

Keywords

Comments

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

Examples

			The spiral starts with the 2 X 2 square 0,1,2,A and this square contains all the digits 0 through 9 at least once; the upper right 2 X 2 square (here) has the same property —— and so have all the 2 X 2 squares of the grid.
.
      18———K——19———L——289—54———21——22           A = 3456789
       |                            |           B = 356789
     208   9———G——10——11———H———13  4056789      C = 306789
       |   |                   |    |           D = 103789
      41   F   4———B——24———5   42  26           E = 45679
       |   |   |           |   |    |           F = 35679
      23  80  12   0———1   C   14  305789       G = 1028
       |   |   |       |   |   |    |           H = 306798
      17   E   3———A———2  45   20  36           I = 3589
       |   |               |   |    .           J = 20359
       J   8——102——7———D———6  13789 .           K = 34567
       |                       |    .           L=  34576
      16——467——I——46——25——204——15   .           ...
		

Crossrefs

A354111 Lexicographically earliest sequence of distinct nonnegative terms on a square spiral such that for any 2 X 2 square of numbers both the sum of those numbers and the sum of the digits of those numbers add up to a square. Start with a(0) = 0.

Original entry on oeis.org

0, 1, 2, 6, 3, 7, 4, 5, 19, 8, 141, 25, 9, 133, 28, 132, 10, 24, 135, 23, 11, 131, 29, 91, 26, 12, 98, 378, 32, 78, 13, 44, 39, 124, 157, 230, 14, 275, 220, 105, 178, 229, 15, 69, 365, 51, 54, 153, 385, 16, 163, 303, 62, 104, 227, 123, 17, 43, 476, 66, 212, 83, 106, 134, 18, 30, 210, 195, 56
Offset: 0

Views

Author

Scott R. Shannon and Eric Angelini, May 17 2022

Keywords

Examples

			The board is numbered with the square spiral:
.
  10--132--28--133--9   .
   |                |   .
  24   3---6---2   25   32
   |   |       |    |   |
  135  7   0---1   141 378
   |   |            |   |
  23   4---5---19---8   98
   |                    |
  11--131--29--91--26---12
.
.
0 + 1 + 2 + 6 = 9 = 3^2;
0 + 6 + 3 + 7 = 16 = 4^2;
0 + 5 + 19 + 1 = 25 = 5^2, and 0 + 5 + 1 + 9 + 1 = 16 = 4^2;
0 + 7 + 4 + 5 = 16 = 4^2;
1 + 141 + 25 + 2 = 169 = 13^2, and 1 + 1 + 4 + 1 + 2 + 5 + 2 = 16 = 4^2;
141 + 378 + 32 + 25 = 576 = 24^2, and 1 + 4 + 1 + 3 + 7 + 8 + 3 + 2 + 2 + 5 = 36 = 6^2;
		

Crossrefs

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

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

A337405 A fractal spiral on a 2D square lattice, one digit per cell, starting at the origin with 0. The odd digits reproduce the spiral itself at another scale (design of the digits is shown below).

Original entry on oeis.org

0, 1, 3, 2, 5, 7, 9, 4, 10, 6, 8, 21, 11, 20, 22, 23, 13, 24, 26, 28, 40, 42, 44, 25, 15, 17, 46, 48, 60, 62, 19, 31, 12, 33, 27, 35, 29, 14, 64, 66, 16, 37, 68, 41, 80, 18, 82, 84, 86, 43, 30, 88, 32, 200, 45, 34, 202, 47, 49, 201, 204, 36, 61, 206, 208, 220, 222, 63, 39, 65, 51, 67, 53, 224, 226
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Aug 26 2020

Keywords

Comments

Here's the font that's used; digits are separated horizontally by a single empty column and vertically by a single empty row. The same digit design was selected 52 years ago by Jonathan Vos Post.
.
%%%...%...%%%...%%%...%.%...%%%...%%%...%%%...%%%...%%%
%.%...%.....%.....%...%.%...%.....%.......%...%.%...%.%
%.%...%...%%%...%%%...%%%...%%%...%%%.....%...%%%...%%%
%.%...%...%.......%.....%.....%...%.%.....%...%.%.....%
%%%...%...%%%...%%%.....%...%%%...%%%.....%...%%%...%%%
.
The spiral's elements are the successive digits of the sequence. The sequence is the lexicographically earliest one of distinct nonnegative terms that starts exactly in the center of the zero formed by the first 12 odd digits (see below).

Examples

			The start of the spiral, with the odd digits forming a zero:
.
       2——3——1——3——2——4
       |              |
       2  9——4——1——0  .
       |  |        |  |
       2  7  0——1  6  .
       |  |     |  |  |
       0  5——2——3  8
       |           |
       2——1——1——1——2
.
The first eight turns of the spiral (the odd digits have brackets which should help the visualization of the scaled new digits):
.
[1]—[3]——2——[1]—[5]—[1]——0——[3]——2——[3]——2——2——[3]——4——2——[1]—[7]—[1]
.|                                                                 |
.2  [3]——2——[1]——2——[5]——6——[5]——8——[7]——0——2——[1]——4——2——[1]——6  [1]
.|   |                                                         |   |
[1] [9]  6——[9]—[5]—[5]——8——[1]—[5]—[7]——2——0——[3]——2——0——[5]  2  [1]
.|   |   |                                                 |   |   |
.0   4   0   2———0——[1]——2———0———4——[3]——6——6——[1]——2——0  [5]  0  [1]
.|   |   |   |                                         |   |   |   |
[1] [5]  4  [9] [3]—[7]——6———8———4——[1]——8——0——[1]——8  6  [9] [7] [1]
.|   |   |   |   |                                  |  |   |   |   |
.8   2   2   4   6   4———6———4———8———6———0——6———2   8  2   8   2   2
.|   |   |   |   |   |                          |   |  |   |   |   |
[9] [5]  8  [7] [1] [7]  2——[3]—[1]—[3]——2——4  [1]  2  0  [3] [1] [1]
.|   |   |   |   |   |   |                  |   |   |  |   |   |   |
.6  [1]  2   4   6  [1]  2  [9]——4——[1]——0  2  [9]  8  8  [7]  8   0
.|   |   |   |   |   |   |   |           |  |   |   |  |   |   |   |
[9] [9]  2   2   6  [5]  2  [7]  0——[1]  6  6  [3]  4  2  [1] [7] [5]
.|   |   |   |   |   |   |   |       |   |  |   |   |  |   |   |   |
.0   0   6   0   4  [1]  0  [5]——2——[3]  8  2  [1]  8  2  [7]  2  [1]
.|   |   |   |   |   |   |               |  |   |   |  |   |   |   |
[3] [1]  2   2   6  [5]  2——[1]—[1]—[1]——2  8  [1]  6  0  [3] [7] [1]
.|   |   |   |   |   |                      |   |   |  |   |   |   |
.2   2   2   4   4   2———4———4———2———4———0——4   2   4  2   8   4   4
.|   |   |   |   |                              |   |  |   |   |   |
[9] [9]  4  [3] [1]—[9]——2——[5]—[3]—[7]——2—[3]—[3] [3] 2  [5] [7] [1]
.|   |   |   |                                      |  |   |   |   |
.0  [7]  2  [5]——4———0———0———2———2——[3]——8——8———0——[3] 2  [7]  6  [1]
.|   |   |                                             |   |   |   |
.2  [7]  2——[3]—[5]—[7]——6——[1]—[5]—[5]——6—[9]—[3]—[3]—6  [5] [7] [3]
.|   |                                                     |   |   |
.0  [7]——4———4———2——[9]——8——[7]——8———2———4——2———0——[5]—8——[3]  8   .
.|                                                             |
[1]—[1]——4——[9]—[9]—[9]——2——[9]—[7]—[9]——0—[9]—[1]—[1]—2——[5]—[9]  .
.
		

Crossrefs

Cf. A126803 (design of the digits), A337115.

A353590 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 square.

Original entry on oeis.org

0, 1, 2, 3, 6, 4, 5, 15, 13, 7, 8, 26, 30, 12, 9, 10, 25, 29, 45, 21, 11, 14, 38, 20, 17, 22, 23, 16, 18, 19, 61, 34, 37, 55, 31, 24, 27, 49, 51, 54, 33, 82, 35, 50, 28, 32, 75, 77, 59, 48, 44, 53, 80, 42, 36, 39, 62, 88, 69, 64, 71, 46, 57, 84, 63, 40, 41, 92, 99, 90, 97, 73, 95
Offset: 0

Views

Author

M. F. Hasler, May 29 2022

Keywords

Comments

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

Examples

			The square array starts:
   0   1   3   5   8  10  14  18  27  32  ...
   2   6  15  26  25  38  19  49  75  ...
   4  13  30  29  20  61  51  77  ...
   7  12  45  17  34  54  59  ...
   9  21  22  37  33  48  ...
  11  23  55  82  44  ...
  16  31  35  53  ...
  24  50  80  ...
  28  42  ...
  36  ...
  ...
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 square, the smallest possible solution is a(4) = 6.
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) = 6 (to the left) to a square; the smallest solution is a(7) = 15.
		

Crossrefs

Cf. A000290 (the squares), A337115 (same idea with square spiral instead of array by antidiagonals), A353591 (same idea with primes instead of squares).

Programs

  • PARI
    A353590_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]), m=sqrtint(s)+1); while(setsearch(U, N=m^2-s)||N<=U[1], m+=1); U=setunion(U, [N]), N=U[1]+=1); mapput(M,[r,c], N); if(c, c--;r++, r=!c=r+1); while(#U>2 && 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

A354375 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 and those sums themselves form another infinite 2D square lattice with the same property.

Original entry on oeis.org

0, 1, 2, 6, 3, 999, 4, 5, 12, 7, 799, 8, 9, 89, 29, 79, 10, 88, 8999, 69, 11, 78, 39, 97, 19, 13, 87, 7999, 59, 14, 15, 169, 39999, 68, 49999, 699, 16, 22, 96, 159, 178, 21, 17, 599, 59999, 49, 58999, 168, 25, 18, 187, 100, 4999, 20, 177, 28, 23, 186, 89999, 99999, 199999, 98999, 9999, 77, 24, 27
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:
.
     11--78--39--97--19--13
      |                   |
     69   4---5--12---7  87
      |   |           |   |
   8999  999  0---1  799 7999
      |   |       |   |   |
     88   3---6---2   8  59
      |               |   |
     10--79--29--89---9  14
                          |
           ... 39999-169-15
.
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 + (9+9+9) = 36, 0 + 999 + 4 + 5 = 36, 0 + 5 + (1+2) + 1 = 9. This is true for any 2 X 2 square on the (infinite) grid; the digits of the upper right corner add up to 36, for instance: (1+9) + (1+3) + (8+7) + 7 = 36; the lower right 2 X 2 square produces 36 = 9 + (1+4) + (1+5) + (1+6+9); etc.
All those successive "square sums" form the hereunder "second-level" spiral:
.
       36---9--36--81
        |           |
       36   9--36  81
        |       |   |
       36--36--36  36
                    |
           ... 81--36
.
Though the terms of this new spiral are not distinct (only multiples of 9), the sum of the digits inside any 2 X 2 square is a square again; the upper left 2 X 2 square produces for instance the square 36 = (3+6) + 9 + 9 + (3+6); the lower left 2 X 2 square produces the square 36 again = (3+6) + 9 + (3+6) + (3+6); the lower right 2 X 2 square produces also the square 36 = (3+6) + (3+6) + (3+6) + (8+1); the initial "center square" produces the same 36 = 9 + (3+6) + (3+6) + (3+6); etc.
		

Crossrefs

Showing 1-10 of 12 results. Next