A236266 Lexicographically earliest sequence of nonnegative integers such that no three points (i,a(i)), (j,a(j)), (n,a(n)) are collinear.
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, 11, 17, 9, 9, 22, 34, 6, 15, 13, 29, 23, 22, 29, 45, 26, 19, 51, 14, 24, 39, 28, 39, 18, 37, 57, 17, 38, 41, 15, 68, 32, 24, 66, 42, 10, 50, 27, 10, 53, 72, 25, 26
Offset: 0
A255709 No three points (i,a(i)), (j,a(j)), (k,a(k)) are collinear and all values distinct, for n = 0,1,2,... the value of a(n) is chosen to be m or -m (in this order) for the smallest m>=0 satisfying the condition.
0, 1, -1, 2, 3, -2, -5, -3, 4, -6, 6, -7, -4, 5, 12, 16, 7, 8, -10, -8, 9, 19, 14, -12, -14, -9, 21, 10, -11, -15, 17, 15, -19, 13, -22, -13, -16, -24, 11, 18, 22, -18, 25, 23, -17, 24, 40, -21, -38, 20, -29, 36, -30, -20, 32, -34, 26, 43, -23, 37, -26, 33
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..20000
Programs
-
Maple
b:= proc() true end: a:= proc(n) option remember; local i, j, k, t, ok; for t from 0 do for k in [t, -t] do ok:=b(k); for j from n-1 to 1 by -1 while ok do for i from j-1 to 0 by -1 while ok do ok:= (n-j)*(a(j)-a(i))<>(j-i)*(k-a(j)) od od; if ok then b(k):=false; return k fi od od end: seq(a(n), n=0..60);
Comments
Examples
Links
Crossrefs
Programs
Maple
Mathematica
Formula