OFFSET
1,2
COMMENTS
Let H_n denote the y=n/x (1<=x<=n) piece of the hyperbola. a(n) is the number of intersections between H_n and the Cartesian grid (Z X R union R X Z) and a(n)-1 is the number of (a,a+1) X (b,b+1) open unit squares, with a and b integers, crossed by H_n.
MAPLE
MATHEMATICA
Table[2 n - DivisorSigma[0, n], {n, 100}]; (* Vincenzo Librandi, Jun 12 2017 *)
PROG
(PARI) a(n) = 2*n - numdiv(n)
(Magma) [2*n - NumberOfDivisors(n): n in [1..100]]; // Vincenzo Librandi, Jun 12 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Luc Rousseau, Jun 11 2017
STATUS
approved