A000323 Let A(n) = #{(i,j): i^2 + j^2 <= n}, V(n) = Pi*n, P(n) = A(n) - V(n); A000099 gives values of n where |P(n)| sets a new record; sequence gives A(A000099(n)).
5, 9, 21, 37, 69, 69, 89, 137, 177, 421, 481, 657, 749, 885, 1085, 1305, 1353, 1489, 1861, 2617, 2693, 3125, 5249, 5761, 7129, 8109, 9465, 9465, 10717, 12401, 12401, 16237, 16237, 24833, 30725, 35237, 46701, 47441, 47441, 61493, 67797, 67805, 67805
Offset: 1
Keywords
References
- 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
- David W. Wilson, Table of n, a(n) for n = 1..200
- W. C. Mitchell, The number of lattice points in a k-dimensional hypersphere, Math. Comp., 20 (1966), 300-310.
Programs
-
Mathematica
nmax = 3*10^4; A[n_] := 1 + 4*Floor[Sqrt[n]] + 4*Floor[Sqrt[n/2]]^2 + 8* Sum[Floor[Sqrt[n - j^2]], {j, Floor[Sqrt[n/2]] + 1, Floor[Sqrt[n]]}]; V[n_] := Pi*n; P[n_] := A[n] - V[n]; record = 0; A000099 = Reap[For[k = 0; n = 1, n <= nmax, n++, p = Abs[P[n]]; If[p > record, record = p; k++; Sow[an = A[n]]; Print["a(", k, ") = ", an];]]][[2, 1]] (* Jean-François Alcover, Feb 07 2016*)
Extensions
Entry revised Jun 28 2005