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
A300002
Lexicographically earliest sequence of positive integers such that no k+2 points fall on any polynomial of degree k.
Original entry on oeis.org
1, 2, 4, 3, 6, 5, 9, 16, 14, 20, 7, 15, 8, 12, 18, 31, 26, 27, 40, 30, 49, 38, 19, 10, 23, 53, 11, 32, 21, 25, 13, 47, 83
Offset: 1
a(1) = 1.
a(2) != 1 or else (1, 1) and (2, 1) fall on y = 1. (Similarly all terms must be distinct.)
a(2) = 2.
a(3) != 1 or else (1, 1) and (3, 1) fall on y = 1.
a(3) != 2 or else (2, 2) and (3, 2) fall on y = 2.
a(3) != 3 or else (1, 1), (2, 2) and (3, 3) fall on y = x.
a(3) = 4.
a(4) != 1 or else (1, 1) and (4, 1) fall on y = 1.
a(4) != 2 or else (2, 2) and (4, 2) fall on y = 2.
a(4) = 3
-
A = {{1, 1}, {2, 2}};
n = 3;
While[n < 50,
c = Sort[Select[Select[InterpolatingPolynomial[#, n] & /@ Subsets[A, {1, n - 1}], # > 0 & ] , IntegerQ]];
B = Differences[c];
If[Max[B] == 1,
d = Max[c] + 1,
d = Part[c, First[Position[B, Select[B, # > 1 &][[1]]]][[1]]] + 1];
A = Append[A, {n, d}];
Print[{n, d}]
n++;
] (* Luca Petrone, Apr 18 2017 *)
A255708
No three points (i,a(i)), (j,a(j)), (k,a(k)) are collinear, 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.
Original entry on oeis.org
0, 0, 1, 1, -1, -1, 4, 2, 2, -3, -5, -2, -7, -2, 5, 3, 3, -5, -4, -4, 6, 5, -6, -3, -10, 11, -6, 4, 18, 11, 19, 7, 12, 12, 6, -13, 19, 7, -10, -7, -9, -14, 13, 23, -28, -8, -14, 9, 8, -22, -9, -8, 23, -11, 15, 22, 13, 8, -21, -13, -26, 9, -12, -12, -11, 40, 21
Offset: 0
-
a:= proc(n) option remember; local i, j, k, t, ok;
for t from 0 do for k in [t, -t] do ok:=true;
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 return k fi
od od
end:
seq(a(n), n=0..60);
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.
Original entry on oeis.org
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
-
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);
A236336
Lexicographically earliest increasing sequence of positive integers whose graph has no three collinear points.
Original entry on oeis.org
1, 2, 4, 5, 9, 12, 16, 22, 26, 33, 38, 45, 53, 60, 61, 76, 86, 91, 92, 97, 111, 112, 121, 134, 135, 147, 148, 150, 153, 157, 167, 180, 200, 212, 223, 227, 228, 238, 246, 264, 269, 282, 286, 305, 312, 313, 321, 322, 327, 328, 360, 374, 389, 393, 395, 420, 421
Offset: 1
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.
-
a:= proc(n) option remember; local i, j, k, ok;
if n<3 then n
else for k from 1+a(n-1) do ok:=true;
for j from n-1 to 2 by -1 while ok do
for i from j-1 to 1 by -1 while ok do
ok:= (n-j)*(a(j)-a(i))<>(j-i)*(k-a(j)) od
od; if ok then return k fi
od
fi
end:
seq(a(n), n=1..70); # Alois P. Heinz, Jan 23 2014
-
g[1] = 1;
g[n_] := g[n] =
Min[Complement[Range[g[n - 1] + 1, 500],
Select[Flatten[
Table[g[k] + (n - k) (g[j] - g[k])/(j - k), {k, n - 2}, {j,
k + 1, n - 1}]], IntegerQ[#] &]]]
Table[g[k], {k, 50}]
A286091
Lexicographically earliest sequence of positive integers such that the slope between any two points (i, a(i)) and (j, a(j)) is distinct.
Original entry on oeis.org
1, 1, 2, 5, 11, 4, 3, 18, 26, 35, 48, 15, 76, 64, 97, 135, 29, 6, 175, 98, 212, 240, 260, 73, 22, 316, 41, 232, 7, 165, 424, 472, 399, 519, 214, 353, 606, 27, 660, 100, 787, 845, 924, 963, 376, 156, 1095, 766, 356, 621, 1206, 32, 501, 1292, 1409, 1169, 1464
Offset: 1
a(3) != 1 otherwise the slope(a(1),a(2)) = slope(a(1),a(3)), therefore
a(3) = 2.
a(4) != 1 otherwise the slope(a(1),a(2)) = slope(a(1),a(4)),
a(4) != 2 otherwise the slope(a(1),a(2)) = slope(a(3),a(4)),
a(4) != 3 otherwise the slope(a(2),a(3)) = slope(a(3),a(4)),
a(4) != 4 otherwise the slope(a(2),a(3)) = slope(a(1),a(4)), therefore
a(4) = 5.
-
A[1]:= 1:
Slopes:= {}:
for n from 2 to 100 do
for k from 1 do
Sk:= {seq((k-A[i])/(n-i),i=1..n-1)};
if Sk intersect Slopes = {} then
A[n]:= k; Slopes:= Slopes union Sk; break
fi
od od:
seq(A[n],n=1..100); # Robert Israel, May 01 2017
-
\\ See link "PARI program". David A. Corneth, May 05 2017
A363554
a(1) = 1; for n > 1, a(n) is the smallest positive integer such that both the gradients and y-intercepts of the lines between any two points (i, a(i)) and (j, a(j)) are distinct.
Original entry on oeis.org
1, 1, 2, 5, 11, 4, 3, 18, 26, 35, 48, 66, 16, 99, 129, 27, 67, 149, 190, 8, 235, 259, 285, 348, 276, 34, 24, 97, 362, 170, 155, 15, 504, 464, 9, 639, 449, 173, 391, 768, 577, 682, 836, 937, 598, 438, 94, 6, 1063, 1007, 500, 210, 1146, 1303, 1390, 806, 1530, 62, 1096, 1739, 212, 28, 1001, 1380
Offset: 1
a(12) = 66. A value of 15, with coordinate (12,15), for this term would create a point for which all line gradients are distinct, see A286091, but it creates a line that passes through the origin with a(4), a point with coordinate (4,5). However the terms a(3), at coordinate (3,2) and a(6), at coordinate (6,4), have already created a line that passes through the origin, thus a(12) cannot be 15. The coordinate (12,66) is the first point the leads to all lines and y-intercepts being distinct.
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.
Original entry on oeis.org
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, 28, 36, 17, 21, 38, 7, 12, 20, 49, 41, 23, 23, 6, 16, 28, 13, 6, 29, 49, 56, 17, 19, 36, 22, 24, 56, 64, 12, 61, 21, 14, 69, 13, 68, 78, 53, 33, 69, 39, 27, 31, 18
Offset: 1
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.
-
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 *)
Comments