login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A059743
Number of points of norm^2 <= n^2 in the square lattice that are visible from the origin.
1
1, 5, 9, 17, 33, 49, 73, 89, 121, 153, 193, 225, 265, 313, 385, 441, 481, 545, 617, 673, 769, 833, 929, 1001, 1113, 1193, 1281, 1385, 1489, 1585, 1705, 1817, 1961, 2073, 2225, 2345, 2481, 2601, 2753, 2913, 3065, 3185, 3361, 3481, 3697, 3857, 4017, 4177
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
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
See also A000328, where visibility is not required.
Sequence in context: A160426 A301786 A258411 * A000322 A205539 A020737
KEYWORD
nonn
AUTHOR
John W. Layman, Oct 13 2001
STATUS
approved