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 A364311 #52 Oct 08 2023 09:56:49 %S A364311 0,1,3,2,5,4,8,11,6,13,12,7,22,16,17,21,9,14,10,27,18,15,19,28,31,43, %T A364311 34,38,23,39,25,36,41,20,55,63,42,30,24,33,26,32,65,66,51,59,29,56,35, %U A364311 62,85,81,37,49,46,68,74,78,88,48,44,75,40,47,97,76,93,79,92,54,58,100,61,101,107,52 %N A364311 Lexicographically earliest infinite sequence of nonnegative integers, {a(n)} for n>=0, such that all lines with equations y = a(n)*x + n are in general position. %C A364311 By "in general position" we mean that no two lines are parallel or coincident, and no three are concurrent. %H A364311 Luc Rousseau, <a href="/A364311/a364311.png">Illustration, the first five lines</a> %e A364311 Line #0 is y = 0*x + 0, as no constraint other than the default one (lexicographically earliest) applies yet, so a(0)=0; %e A364311 Line #1 cannot be y = 0*x + 1, as the reuse of the slope of a previously defined line implies parallelism; but it can be y = 1*x + 1, so a(1)=1; %e A364311 Line #2 cannot be y = 2*x + 2, as lines #0, #1 and #2 would be concurrent at (-1,0); but Line #2 can be y = 3*x + 2, so a(2)=3; ... %o A364311 (PARI) %o A364311 g(n,an,p)=my(b=1);for(i=1,#p,if(p[i][2]==an*p[i][1]+n,b=0;break));b %o A364311 c(n,s,p)=my(an=0);while((setsearch(s,an,0)!=0)||!g(n,an,p),an++);an %o A364311 w(n,a,an,p)=for(m=0,#a-1,my(am=a[1+m]);listput(p,[(m-n)/(an-am),(am*n-an*m)/(am-an)]));p %o A364311 list_a(N)=my(a=List(),s=List(),p=List(),n=0,an);while(n<=N,an=c(n,s,p);p=w(n,a,an,p);listput(a,an);listinsert(s,an,setsearch(s,an,1));n++);Vec(a) %o A364311 list_a(75) %Y A364311 Cf. A000217 (number of intersection points to avoid after line #n is created). %K A364311 nonn %O A364311 0,3 %A A364311 _Luc Rousseau_, Sep 22 2023