OFFSET
0,2
COMMENTS
A lattice point (i,j) is "visible" from the origin if no other lattice point lies on the line segment from (0,0) to (i,j), which is equivalent to saying that i and j are relatively prime. By convention, we say that (0,0) is visible from the origin.
REFERENCES
Tom M. Apostol, "Introduction to Analytic Number Theory", Springer-Verlag, Section 3.8.
LINKS
Robert Israel, Table of n, a(n) for n = 0..7152
MAPLE
N:= 100; # to get a(0) to a(N)
for n from 1 to N do
C[n]:= Array(1..n, j -> `if`(igcd(n, j)=1, 1, 0)):
B[n]:= map(round, Statistics[CumulativeSum](C[n]));
od:
1, 5, 9, seq(1 + 8*(add(numtheory[phi](x), x=1..floor(n/sqrt(2)))+add(B[x][floor(sqrt(n^2-x^2))], x=ceil(n/sqrt(2))..n-1)), n = 3 .. N); # Robert Israel, Jun 15 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Layman, Oct 13 2001
STATUS
approved