login
A334046
a(n) is the number of points of the set { (k, prime(k)), k = 1..n-1 } that are not visible from the point (n, prime(n)) (where prime(n) denotes the n-th prime number).
2
0, 0, 0, 1, 0, 0, 1, 2, 2, 1, 1, 2, 3, 2, 4, 4, 3, 5, 2, 3, 6, 5, 6, 4, 2, 3, 5, 4, 4, 6, 2, 2, 5, 4, 4, 6, 7, 5, 7, 7, 6, 6, 7, 6, 8, 8, 7, 5, 4, 4, 5, 8, 8, 6, 7, 7, 8, 8, 12, 10, 11, 12, 6, 7, 11, 10, 5, 5, 7, 6, 10, 10, 10, 11, 11, 12, 15, 12, 13, 13, 11
OFFSET
1,8
COMMENTS
For any i and k such that i < k: the point (i, prime(i)) is visible from the point (k, prime(k)) if there are no j such that i < j < k and the three points (i, prime(i)), (j, prime(j)), (k, prime(k)) are aligned.
LINKS
EXAMPLE
For n = 4:
- we consider the following points:
. . . X
/ (4,7)
. . . / .
/
. . X .
/ (3,5)
. . / . .
/
. X . .
(2,3)
X . . .
(1,2)
. . . .
- (2,3) is not visible from (4,7) (as it is hidden by (3,5)),
- whereas (1,2) and (3,5) are visible from (4,7),
- hence a(4) = 1.
PROG
(PARI) g(z) = z/gcd(real(z), imag(z))
for (n=1, 81, print1 (n-1-#Set(apply(k -> g((k+prime(k)*I)-(n+prime(n)*I)), [1..n-1]))", "))
CROSSREFS
Sequence in context: A305825 A366780 A324029 * A136605 A165621 A284321
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Apr 13 2020
STATUS
approved