OFFSET
0,2
COMMENTS
Row sums of triangle A255238. - Wolfdieter Lang, Mar 15 2015
REFERENCES
H. Gupta, A Table of Values of N_3(t), Proc. National Institute of Sciences of India, 13 (1947), 35-63.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = n^2 * Pi/4 + O(n). - Charles R Greathouse IV, Apr 03 2013
a(n) = A001182(n) + 2*n + 1. - R. J. Mathar, Jan 07 2015
a(n) = 2*A026702(n) - (1 + floor(n/sqrt(2))), n >= 0. - Wolfdieter Lang, Mar 15 2015
a(n) = [x^(n^2)] (1 + theta_3(x))^2/(4*(1 - x)), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 15 2018
MATHEMATICA
Table[cnt = 0; Do[If[x^2 + y^2 <= n^2, cnt++], {x, 0, n}, {y, 0, n}]; cnt, {n, 0, 51}] (* T. D. Noe, Apr 02 2013 *)
Table[If[n==1, 1, 2*Sum[Sum[A255195[[n, n - k + 1]], {k, 1, k}], {k, 1, n}] - Ceiling[(n - 1)/Sqrt[2]]], {n, 1, 52}] (* Mats Granvik, Feb 19 2015 *)
PROG
(Haskell)
a000603 n = length [(x, y) | x <- [0..n], y <- [0..n], x^2 + y^2 <= n^2]
-- Reinhard Zumkeller, Jan 23 2012
(PARI) a(n)=my(n2=n^2); sum(a=0, n, sqrtint(n2-a^2)+1) \\ Charles R Greathouse IV, Apr 03 2013
(Python)
from math import isqrt
def A000603(n): return (m:=n<<1)+sum(isqrt(k*(m-k)) for k in range(1, n))+1 # Chai Wah Wu, Jul 18 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from David W. Wilson, May 22 2000
STATUS
approved