%I #12 Mar 31 2022 17:00:10
%S 0,0,1,0,1,1,1,5,0,4,0,4,13,0,1,4,5,4,1,5,10,0,4,1,5,5,1,2,0,1,5,2,25,
%T 0,5,4,16,0,1,1,2,1,4,5,1,10,106,0,1,1,1,1,1,2,5,5,29,0,1,1,1,1,1,1,1,
%U 2,5,1,13,49,0,4,17,0,8,0,8,8,2,73,0,4,13,5,13,8,5,10,25,37,0
%N Square array filled and read by antidiagonals upwards; the first value is 0; if the previous value has already appeared in the table, then the next value is the square of the distance to the nearest earlier position with the same value; otherwise the next value is 0.
%C This sequence is a two-dimensional variant of Van Eck's sequence (A181391).
%C When working on a square spiral, we quickly end with all 1's:
%C 1--1--1--1--1--1--1
%C | |
%C 1 1--1--0-13--2 1
%C . | | |
%C . 1 1--0--1 0 1
%C . | | | | |
%C 1 4 0--0 5 1
%C | | | |
%C 1 0--2--0--1 1
%C | |
%C 1--1--1--1--1--1
%H Rémy Sigrist, <a href="/A350281/b350281.txt">Table of n, a(n) for n = 0..10010</a>
%H Rémy Sigrist, <a href="/A350281/a350281.txt">C++ program</a>
%e Square array begins:
%e n\k| 0 1 2 3 4 5 6 7 8 9
%e ---+----------------------------------------
%e 0| 0 1 1 4 1 10 2 4 1 5
%e 1| 0 1 0 0 5 1 5 5 2 1
%e 2| 0 5 13 1 5 0 4 1 1 0
%e 3| 1 4 4 5 25 1 1 1 8 10
%e 4| 0 5 1 2 2 1 1 0 5 1
%e 5| 4 4 5 1 1 1 17 8 5 1
%e 6| 0 1 1 1 1 4 13 1 1 29
%e 7| 0 0 0 1 0 5 5 1 25 2
%e 8| 16 106 0 49 13 1 1 2 5 20
%e 9| 10 29 13 4 4 1 8 5 0 2
%o (C++) See Links section.
%Y Cf. A001481, A181391.
%K nonn,tabl
%O 0,8
%A _Rémy Sigrist_, Mar 27 2022