A014202 Number of solutions to x^2 + x*y + y^2 <= n, excluding (0,0), divided by 6.
0, 1, 1, 2, 3, 3, 3, 5, 5, 6, 6, 6, 7, 9, 9, 9, 10, 10, 10, 12, 12, 14, 14, 14, 14, 15, 15, 16, 18, 18, 18, 20, 20, 20, 20, 20, 21, 23, 23, 25, 25, 25, 25, 27, 27, 27, 27, 27, 28, 31, 31, 31, 33, 33, 33, 33, 33, 35, 35, 35
Offset: 0
Programs
-
PARI
a(n)=if(n<1,0,sum(k=1,n,kronecker(k,3)*floor(n/k))) \\ Benoit Cloitre, Oct 31 2009
Formula
For n > 0, a(n) = Sum_{k=1..n} K(k,3)*floor(n/k) where K(x,y) is the Kronecker symbol. - Benoit Cloitre, Oct 31 2009