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).
Original entry on oeis.org
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
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.
-
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]))", "))
A334044
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 not visible from the point (n-1, a(n-1)).
Original entry on oeis.org
0, 0, 0, 1, 0, 2, 1, 0, 4, 1, 1, 2, 2, 2, 3, 2, 3, 5, 2, 6, 4, 3, 3, 4, 4, 7, 1, 5, 5, 2, 6, 5, 4, 6, 6, 9, 0, 6, 9, 3, 4, 7, 5, 8, 5, 6, 6, 10, 8, 10, 7, 7, 7, 5, 6, 11, 6, 11, 8, 6, 14, 8, 8, 10, 11, 9, 8, 15, 8, 12, 8, 12, 11, 6, 14, 8, 12, 14, 10, 13, 8
Offset: 1
For n = 6:
- we consider the following points:
. . . X .
(4,1)
X X X . X
(1,0) (2,0) (3,0) (5,0)
- the points (1,0) and (2,0) are not visible from (5,0)
(as they are hidden by (3,0)),
- whereas the points (3,0) and (4,1) are visible from (5,0)
- hence a(6) = 2.
See
A334043 for a similar sequence.
-
g(z) = z/gcd(real(z), imag(z))
for (n=1, #a=vector(81), print1 (a[n] = max(0, n-2) - #Set(apply(k -> g((k+a[k]*I)-(n-1+a[n-1]*I)), [1..n-2]))", "))
A375423
a(1) = 1; for any n > 1, a(n) is the maximum number of points from the set {(k, a(k)), k = 1..n-1} belonging to a straight line passing through the point (n-1, a(n-1)).
Original entry on oeis.org
1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 3, 5, 5, 4, 4, 5, 3, 6, 4, 6, 3, 7, 5, 4, 7, 4, 8, 4, 9, 5, 5, 6, 4, 10, 6, 4, 11, 6, 5, 7, 3, 8, 3, 9, 4, 12, 3, 10, 4, 13, 3, 11, 5, 8, 3, 12, 6, 6, 7, 4, 14, 4, 15, 4, 16, 4, 17, 4, 18, 5, 9, 4, 19, 4, 20, 5, 10, 3, 13, 3
Offset: 1
The first terms, alongside an appropriate set of points, are:
n a(n) Points
-- ---- -----------------------------------
1 1 N/A
2 1 (1,1)
3 2 (1,1), (2,1)
4 2 (1,1), (3,2)
5 2 (1,1), (4,2)
6 3 (3,2), (4,2), (5,2)
7 3 (2,1), (4,2), (6,3)
8 3 (1,1), (4,2), (7,3)
9 3 (2,1), (5,2), (8,3)
10 4 (6,3), (7,3), (8,3), (9,3)
11 4 (1,1), (4,2), (7,3), (10,4)
12 4 (2,1), (5,2), (8,3), (11,4)
13 3 (4,2), (8,3), (12,4)
14 5 (6,3), (7,3), (8,3), (9,3), (13,3)
15 5 (2,1), (5,2), (8,3), (11,4), (14,5)
Showing 1-3 of 3 results.
Comments