login
A334043
a(1) = 0, and for any n > 1, a(n) is the number of points of the set { (k, a(k)), k = 1..n-2 } that are visible from the point (n-1, a(n-1)).
4
0, 0, 1, 2, 2, 3, 5, 4, 5, 7, 8, 8, 10, 8, 9, 12, 11, 13, 16, 14, 15, 16, 14, 17, 20, 20, 17, 21, 25, 23, 26, 28, 27, 25, 29, 25, 31, 27, 34, 34, 28, 39, 35, 36, 41, 36, 40, 41, 41, 42, 45, 35, 49, 45, 47, 46, 49, 47, 49, 47, 54, 54, 52, 56, 54, 54, 58, 56, 59
OFFSET
1,4
COMMENTS
For any i and k such that i < k: the point (i, a(i)) is visible from the point (k, a(k)) if there are no j such that i < j < k and the three points (i, a(i)), (j, a(j)), (k, a(k)) are aligned.
LINKS
EXAMPLE
For n = 5:
- we consider the following points:
. . . X
/ (4,2)
. . X .
/ (3,1)
X X . .
(1,0) (2,0)
- (1,0) and (3,1) are visible from (4,2)
- whereas (2,0) is not visible from (4,2),
- hence a(5) = 2.
PROG
(PARI) g(z) = z/gcd(real(z), imag(z))
for (n=1, #a=vector(69), print1 (a[n] = #Set(apply(k -> g((k+a[k]*I)-(n-1+a[n-1]*I)), [1..n-2])) ", "))
CROSSREFS
See A334044 for a similar sequence.
Cf. A231334.
Sequence in context: A026408 A301790 A301964 * A301884 A302081 A209147
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Apr 13 2020
STATUS
approved