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.

A361374 Make a square spiral starting with a(1)=1, a(2)=2. Then, each position gets the smallest unused number which is the sum of a path of numbers starting from that position.

This page as a plain text file.
%I A361374 #35 May 16 2023 14:58:31
%S A361374 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,
%T A361374 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,
%U A361374 50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,74
%N A361374 Make a square spiral starting with a(1)=1, a(2)=2. Then, each position gets the smallest unused number which is the sum of a path of numbers starting from that position.
%C A361374 A path can go in any cardinal direction or diagonal. A path may not repeat the same number.
%C A361374 For a while, this sequence seems to simply be the natural numbers. However, the percentage of natural numbers in this sequence tends to 0. E.g., only 2347 of the first million natural numbers are in this sequence.
%C A361374 a(73) = 72 is the first to break from the natural numbers. 97 is the least positive number which does not occur.
%H A361374 Samuel Harkness, <a href="/A361374/b361374.txt">Table of n, a(n) for n = 1..10000</a>
%H A361374 Samuel Harkness, <a href="/A361374/a361374.m.txt">MATLAB program</a>
%e A361374 For a(42), the first candidate to check is 42, as it is the least unused positive integer. 20-22 is a valid path which ends at a(42) and whose sum is 42, so a(42) = 42. (path shown below)
%e A361374 .
%e A361374    37   36   35   34   33   32   31
%e A361374 .
%e A361374    38   17   16   15   14   13   30
%e A361374 .
%e A361374    39   18    5    4    3   12   29
%e A361374 .
%e A361374    40   19    6    1    2   11   28
%e A361374 .
%e A361374    41   20    7    8    9   10   27
%e A361374 .     /    \
%e A361374  start  21   22   23   24   25   26
%e A361374 .
%e A361374 For a(73), the first candidate to check is 73, as it is the least unused positive integer. No paths starting at a(73) equal 73, so check the next candidate, 74. 43-21-7-1-2 is a valid path starting at a(73) and whose sum is 74, so a(73) = 74. (path shown below)
%e A361374 .
%e A361374    65   64   63   62   61   60   59   58   57
%e A361374 .
%e A361374    66   37   36   35   34   33   32   31   56
%e A361374 .
%e A361374    67   38   17   16   15   14   13   30   55
%e A361374 .
%e A361374    68   39   18    5    4    3   12   29   54
%e A361374 .
%e A361374    69   40   19    6    1----2   11   28   53
%e A361374 .                     /
%e A361374    70   41   20    7    8    9   10   27   52
%e A361374 .               /
%e A361374    71   42   21   22   23   24   25   26   51
%e A361374 .          /
%e A361374    72   43   44   45   46   47   48   49   50
%e A361374       /
%e A361374  start
%e A361374 .
%e A361374 The first 144 terms:
%e A361374 .
%e A361374   164-162-159-155-153-152-151-149-148-147-146-158
%e A361374                                                 |
%e A361374   102-100--99--96--94--93--92--91--90--89-101 154
%e A361374     |                                       |   |
%e A361374   103  65--64--63--62--61--60--59--58--57  98 150
%e A361374     |   |                               |   |   |
%e A361374   104  66  37--36--35--34--33--32--31  56  95 141
%e A361374     |   |   |                       |   |   |   |
%e A361374   105  67  38  17--16--15--14--13  30  55  85 140
%e A361374     |   |   |   |               |   |   |   |   |
%e A361374   106  68  39  18   5---4---3  12  29  54  84 139
%e A361374     |   |   |   |   |       |   |   |   |   |   |
%e A361374   107  69  40  19   6   1---2  11  28  53  82 135
%e A361374     |   |   |   |   |           |   |   |   |   |
%e A361374   108  70  41  20   7---8---9--10  27  52  81 134
%e A361374     |   |   |   |                   |   |   |   |
%e A361374   110  71  42  21--22--23--24--25--26  51  88 133
%e A361374     |   |   |                           |   |   |
%e A361374   112  72  43--44--45--46--47--48--49--50  87 138
%e A361374     |   |                                   |   |
%e A361374   114  74--73--75--76--77--78--79--80--83--86 137
%e A361374     |                                           |
%e A361374   117-116-118-119-120-121-122-124-126-128-132-136
%e A361374 .
%e A361374 Note that 97 does not (and will not) occur. A path must start with one of the outer-most cells, all of which are greater than 97, and nothing below their minimum can ever be reached again.
%o A361374 (MATLAB) See Links section.
%Y A361374 Cf. A174344, A274923 (spiral coordinates).
%Y A361374 Cf. A141481, A334742.
%K A361374 nonn
%O A361374 1,2
%A A361374 _Samuel Harkness_, Mar 28 2023