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!)
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). 1

%I #12 Apr 19 2020 05:21:58

%S 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,

%T 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,

%U 10,5,5,7,6,10,10,10,11,11,12,15,12,13,13,11

%N 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).

%C 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.

%H Rémy Sigrist, <a href="/A334046/b334046.txt">Table of n, a(n) for n = 1..10000</a>

%e For n = 4:

%e - we consider the following points:

%e . . . X

%e / (4,7)

%e . . . / .

%e /

%e . . X .

%e / (3,5)

%e . . / . .

%e /

%e . X . .

%e (2,3)

%e X . . .

%e (1,2)

%e . . . .

%e - (2,3) is not visible from (4,7) (as it is hidden by (3,5)),

%e - whereas (1,2) and (3,5) are visible from (4,7),

%e - hence a(4) = 1.

%o (PARI) g(z) = z/gcd(real(z), imag(z))

%o for (n=1, 81, print1 (n-1-#Set(apply(k -> g((k+prime(k)*I)-(n+prime(n)*I)), [1..n-1]))", "))

%Y Cf. A000040, A334043.

%K nonn

%O 1,8

%A _Rémy Sigrist_, Apr 13 2020

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 May 5 13:00 EDT 2024. Contains 372275 sequences. (Running on oeis4.)