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.

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.

This page as a plain text file.
%I A354374 #7 Jun 25 2022 22:04:18
%S A354374 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,
%T A354374 18,25,42,69,699,20,26,21,999,299,599,22,28,30,31,34,38,27,37,36,40,
%U A354374 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
%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.
%C A354374 This is the earliest permutation of the nonnegative integers with this property.
%e A354374 The spiral begins:
%e A354374 .
%e A354374      16--23--29-5999-33--18
%e A354374       |                   |
%e A354374      24   5---8--11---7  25
%e A354374       |   |           |   |
%e A354374      39   6   0---1   9  42
%e A354374       |   |       |   |   |
%e A354374      19   3---4---2  10  69
%e A354374       |               |   |
%e A354374      15--13--17--14--12 699
%e A354374                           |
%e A354374         ... 999--21--26--20
%e A354374 .
%e A354374 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.
%e A354374 All those successive "prime sums" form the hereunder "second-level" spiral:
%e A354374 .
%e A354374      37--19--43 ...
%e A354374       |
%e A354374      43  11--19--19--23
%e A354374       |   |           |
%e A354374      31  13   7--13  31
%e A354374       |   |       |   |
%e A354374      29  19--11--19  29
%e A354374       |               |
%e A354374      29--47--53--29--23
%e A354374 .
%e A354374 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.
%Y A354374 Cf.  A337115, A337116, A337117, A337368, A354372, A354373, A354375.
%K A354374 base,nonn
%O A354374 1,3
%A A354374 _Eric Angelini_ and _Carole Dubois_, May 24 2022