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).
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
Keywords
Examples
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.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
Programs
-
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]))", "))
Formula
a(n) = n-1-A375421(n). - Pontus von Brömssen, Feb 14 2025
Comments