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.

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

This page as a plain text file.
%I A334044 #11 Apr 19 2020 05:21:54
%S A334044 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,
%T A334044 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,
%U A334044 9,8,15,8,12,8,12,11,6,14,8,12,14,10,13,8
%N 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)).
%C A334044 For any i and k such that i < k: the point (i, a(i)) is visible from the point (k, a(k)) if there are no j such that i < j < k and the three points (i, a(i)), (j, a(j)), (k, a(k)) are aligned.
%H A334044 Rémy Sigrist, <a href="/A334044/b334044.txt">Table of n, a(n) for n = 1..10000</a>
%e A334044 For n = 6:
%e A334044 - we consider the following points:
%e A334044       .    .    .    X    .
%e A334044                    (4,1)
%e A334044       X    X    X    .    X
%e A334044    (1,0) (2,0) (3,0)    (5,0)
%e A334044 - the points (1,0) and (2,0) are not visible from (5,0)
%e A334044   (as they are hidden by (3,0)),
%e A334044 - whereas the points (3,0) and (4,1) are visible from (5,0)
%e A334044 - hence a(6) = 2.
%o A334044 (PARI) g(z) = z/gcd(real(z), imag(z))
%o A334044 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]))", "))
%Y A334044 See A334043 for a similar sequence.
%K A334044 nonn
%O A334044 1,6
%A A334044 _Rémy Sigrist_, Apr 13 2020