cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A334046 #15 Feb 14 2025 08:25:34
%S A334046 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 A334046 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 A334046 10,5,5,7,6,10,10,10,11,11,12,15,12,13,13,11
%N 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).
%C A334046 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 A334046 Rémy Sigrist, <a href="/A334046/b334046.txt">Table of n, a(n) for n = 1..10000</a>
%F A334046 a(n) = n-1-A375421(n). - _Pontus von Brömssen_, Feb 14 2025
%e A334046 For n = 4:
%e A334046 - we consider the following points:
%e A334046      .   .   .   X
%e A334046                 / (4,7)
%e A334046      .   .   . / .
%e A334046               /
%e A334046      .   .   X   .
%e A334046             / (3,5)
%e A334046      .   . / .   .
%e A334046           /
%e A334046      .   X   .   .
%e A334046           (2,3)
%e A334046      X   .   .   .
%e A334046       (1,2)
%e A334046      .   .   .   .
%e A334046 - (2,3) is not visible from (4,7) (as it is hidden by (3,5)),
%e A334046 - whereas (1,2) and (3,5) are visible from (4,7),
%e A334046 - hence a(4) = 1.
%o A334046 (PARI) g(z) = z/gcd(real(z), imag(z))
%o A334046 for (n=1, 81, print1 (n-1-#Set(apply(k -> g((k+prime(k)*I)-(n+prime(n)*I)), [1..n-1]))", "))
%Y A334046 Cf. A000040, A334043, A375421.
%K A334046 nonn
%O A334046 1,8
%A A334046 _Rémy Sigrist_, Apr 13 2020