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.

A236266 Lexicographically earliest sequence of nonnegative integers such that no three points (i,a(i)), (j,a(j)), (n,a(n)) are collinear.

This page as a plain text file.
%I A236266 #40 Sep 14 2022 15:26:18
%S A236266 0,0,1,1,4,3,8,2,2,5,7,4,5,8,16,3,7,14,12,23,16,12,25,31,13,6,11,28,
%T A236266 11,17,9,9,22,34,6,15,13,29,23,22,29,45,26,19,51,14,24,39,28,39,18,37,
%U A236266 57,17,38,41,15,68,32,24,66,42,10,50,27,10,53,72,25,26
%N A236266 Lexicographically earliest sequence of nonnegative integers such that no three points (i,a(i)), (j,a(j)), (n,a(n)) are collinear.
%C A236266 (a(n)-a(j))/(n-j) <> (a(j)-a(i))/(j-i) for all 0<=i<j<n.  No value occurs more than twice.  Each triangle with (distinct) vertices (i,a(i)), (j,a(j)), (n,a(n)) has area larger than zero.
%H A236266 Alois P. Heinz, <a href="/A236266/b236266.txt">Table of n, a(n) for n = 0..20000</a>
%H A236266 Dániel T. Nagy, Zoltán Lóránt Nagy, and Russ Woodroofe, <a href="https://arxiv.org/abs/2209.01447">The extensible No-Three-In-Line problem</a>, arXiv:2209.01447 [math.CO], 2022.
%F A236266 a(n) = A236335(n+1) - 1. - _Alois P. Heinz_, Jan 23 2014
%e A236266 For n=4 the value of a(n) cannot be less than 4 because otherwise we would have a set of three collinear points, {(0,0),(1,0),(4,0)} or {(2,1),(3,1),(4,1)} or {(0,0),(2,1),(4,2)} or {(1,0),(2,1),(4,3)}.  Thus a(4) = 4 is the first value that is in accordance with the constraints.
%p A236266 a:= proc(n) option remember; local i, j, k, ok;
%p A236266       for k from 0 do ok:=true;
%p A236266         for j from n-1 to 1 by -1 while ok do
%p A236266           for i from j-1 to 0 by -1 while ok do
%p A236266             ok:= (n-j)*(a(j)-a(i))<>(j-i)*(k-a(j)) od
%p A236266         od; if ok then return k fi
%p A236266       od
%p A236266     end:
%p A236266 seq(a(n), n=0..60);
%t A236266 a[0] = a[1] = 0; a[n_] := a[n] = Module[{i, j, k, ok}, For[k = 0, True, k++, 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)*(k-a[j])]]; If[ok, Return[k]]]];
%t A236266 Table[a[n], {n, 0, 70}] (* _Jean-François Alcover_, Jun 16 2018, after _Alois P. Heinz_ *)
%Y A236266 Cf. A005836, A179040, A231334, A236335, A255708, A255709.
%K A236266 nonn,look
%O A236266 0,5
%A A236266 _Alois P. Heinz_, Jan 21 2014