Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #20 Apr 28 2019 18:25:10
%S 1,2,4,5,9,12,16,22,26,33,38,45,53,60,61,76,86,91,92,97,111,112,121,
%T 134,135,147,148,150,153,157,167,180,200,212,223,227,228,238,246,264,
%U 269,282,286,305,312,313,321,322,327,328,360,374,389,393,395,420,421
%N Lexicographically earliest increasing sequence of positive integers whose graph has no three collinear points.
%C An increasing version of A236335.
%H Alois P. Heinz, <a href="/A236336/b236336.txt">Table of n, a(n) for n = 1..10000</a>
%e Consider a(5). The previous terms are 1,2,4,5. The value of a(5) can't be 6 because points (3,4),(4,5),(5,6) (corresponding to values a(3),a(4),a(5)) are on the same line: y=x+1. Points (1,1),(3,4),(5,7) are on the same line y=3x/2-1/2, so a(5) can't be 7. Points (2,2),(3,4),(5,8) are on the same line: y=2x-2, so a(5) can't be 8. Thus a(5)=5.
%p a:= proc(n) option remember; local i, j, k, ok;
%p if n<3 then n
%p else for k from 1+a(n-1) do ok:=true;
%p for j from n-1 to 2 by -1 while ok do
%p for i from j-1 to 1 by -1 while ok do
%p ok:= (n-j)*(a(j)-a(i))<>(j-i)*(k-a(j)) od
%p od; if ok then return k fi
%p od
%p fi
%p end:
%p seq(a(n), n=1..70); # _Alois P. Heinz_, Jan 23 2014
%t g[1] = 1;
%t g[n_] := g[n] =
%t Min[Complement[Range[g[n - 1] + 1, 500],
%t Select[Flatten[
%t Table[g[k] + (n - k) (g[j] - g[k])/(j - k), {k, n - 2}, {j,
%t k + 1, n - 1}]], IntegerQ[#] &]]]
%t Table[g[k], {k, 50}]
%Y Cf. A229037, A185256, A236335.
%K nonn
%O 1,2
%A _Tanya Khovanova_, Jan 22 2014