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.
%I A305921 #11 Jul 15 2018 13:45:57 %S A305921 0,0,1,1,5,3,8,2,3,2,4,8,9,7,15,11,4,10,5,11,16,9,30,38,26,30,18,10, %T A305921 28,36,17,21,38,7,12,20,49,41,23,23,6,16,28,13,6,29,49,56,17,19,36,22, %U A305921 24,56,64,12,61,21,14,69,13,68,78,53,33,69,39,27,31,18 %N A305921 Lexicographically earliest sequence of nonnegative integers such that no three points (i,a(i)), (j,a(j)), (n,a(n)) are collinear and no four points (i,a(i)), (j,a(j)), (k,a(k)), (n,a(n)) are on a circle. %e A305921 The sequence starts like A236266, but a(5) cannot be 4, because (1,0), (2,0), (4,1) and (5,4) lie on the same circle. %t A305921 a[0] = a[1] = 0; a[2] = 1; a[n_] := a[n] = Module[{i, j, k, l, AB, AC, CD, BC, BD, AD, ok, ok1}, For[l = 0, True, l++, ok = True; For[j = n - 1, ok && j >= 1, j--, For[i = j - 1, ok && i >= 0, i--, ok = (n - j)*(a[j] - a[i]) != (j - i)*(l - a[j])]]; If[ok, For[k = n - 1, ok && k >= 1, k--, For[j = k - 1, ok && j >= 0, j--, For[i = j - 1, ok && i >= 0, i--, AB = ((a[i] - a[j])^2 + (i - j)^2)^0.5; AC = ((a[i] - a[k])^2 + (i - k)^2)^0.5; CD = ((a[k] - l)^2 + (k - n)^2)^0.5; BC = ((a[k] - a[j])^2 + (k - j)^2)^0.5; BD = ((a[j] - l)^2 + (j - n)^2)^0.5; AD = ((a[i] - l)^2 + (i - n)^2)^0.5; ok = AB*CD + BC*AD != AC*BD;];];]; If[ok, Return[l]]]]] (* _Luca Petrone_ Jun 17 2018, based on A236266 program by _Jean-François Alcover_ *) %Y A305921 Cf. A236266, A236335. %K A305921 nonn %O A305921 1,5 %A A305921 _Luca Petrone_, Jun 14 2018