login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A236336 Lexicographically earliest increasing sequence of positive integers whose graph has no three collinear points. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
An increasing version of A236335.
LINKS
EXAMPLE
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.
MAPLE
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
MATHEMATICA
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}]
CROSSREFS
Sequence in context: A241408 A039021 A295564 * A239515 A087667 A241444
KEYWORD
nonn
AUTHOR
Tanya Khovanova, Jan 22 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)