OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..300
Benoit Cloitre, On the circle and divisor problems.
FORMULA
Equals A038589(n) - 1. - Neven Juric, May 10 2010
From Benoit Cloitre, Oct 27 2012: (Start)
a(n) = 6*Sum_{k=0..n/3} (floor(n/(3k+1)) - floor(n/(3k+2))).
a(n) is asymptotic to 2*(Pi/sqrt(3))*n.
Conjecture: a(n) = 2*(Pi/sqrt(3))*n + O(n^(1/4 + epsilon)), similar to the Gauss circle or Dirichlet divisor problems. (End)
MATHEMATICA
a[n_] := Sum[ Length[ {ToRules[ Reduce[ x^2 + x*y + y^2 == k, {x, y}, Integers]]}], {k, 1, n}]; Table[ a[n], {n, 0, 48}] (* Jean-François Alcover, Feb 23 2012 *)
PROG
(PARI) a(n)=6*sum(k=0, n\3, (n\(3*k+1))-(n\(3*k+2))) \\ Benoit Cloitre, Oct 27 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved