A366353 a(0) = 0; for n > 0, a(n) is the largest taxicab distance on a square spiral between a(n-1) and any previous occurrence of a(n-1). If a(n-1) has not previously occurred then a(n) = 0.
0, 0, 1, 0, 2, 0, 2, 2, 3, 0, 4, 0, 4, 2, 5, 0, 6, 0, 6, 2, 6, 4, 7, 0, 6, 8, 0, 7, 5, 4, 8, 5, 3, 4, 6, 8, 10, 0, 9, 0, 7, 7, 8, 12, 0, 7, 6, 8, 10, 12, 6, 10, 11, 0, 9, 8, 13, 0, 11, 6, 9, 6, 11, 10, 13, 8, 12, 13, 11, 10, 9, 12, 8, 15, 0, 13, 13, 12, 11, 12, 13, 16, 0, 13, 15, 11, 11, 10, 12
Offset: 0
Keywords
Examples
The spiral begins: . . 10--8---6---4---3---5---8 : | | : 0 6---0---5---2---4 4 9 | | | | | 9 0 2---0---1 0 5 0 | | | | | | | 0 6 0 0---0 4 7 11 | | | | | | 7 2 2---2---3---0 0 10 | | | | 7 6---4---7---0---6---8 6 | | 8---12--0---7---6---8---10--12 . a(2) = 1 as the taxicab distance between a(1) = 0, at (1,0) relative to the starting square, and the only previous occurrence of 0, a(0) at (0,0), is 1. a(8) = 3 as the maximum taxicab distance between a(7) = 2, at (0,-1) relative to the starting square, and any previous occurrence of 2 is 3, to a(4) = 2 at (-1,1) relative to the starting square. a(32) = 3 as the maximum taxicab distance between a(31) = 5, at (2,3) relative to the starting square, and any previous occurrence of 5 is 3, to a(28) = 5 at (3,1) relative to the starting square, and also to a(14) = 5 at (0,2) relative to the starting square. This is the first term to differ from A366354.
Links
- Scott R. Shannon, Table of n, a(n) for n = 0..10000
- Scott R. Shannon, Image of the first 500000 terms.
- Scott R. Shannon, Image of the first 50000 terms on the square spiral. The colors are graduated across the spectrum to show their relative size. Zoom in to see the numbers.