TITLE: What is the smallest sphere whose surface includes 100 integer points?
QUESTION [9 upvotes]: Let $S(r)$ be the surface of the origin-centered sphere in $\mathbb{R}^3$.
A point is an integer point if all its coordinates are integers.

What is the smallest radius $r_n$ such that $S(r_n)$ includes $\ge n$ integer points?

What is the growth rate of $r_n$ with respect to $n$?
Is there an algorithm that could compute $r_n$ for a specific given $n$?
It is known that rational points (all coordinates rational) are dense on $S(1)$:
see, e.g., the MO question
Rational points on a sphere in $\mathbb{R}^d$.
One possible approach is via rational points of bounded height.
The height of a rational $a/b$ in lowest terms is max$(|a|,|b|)$, and
the height of a rational point is the max of the heights of its coordinates.

          


          

Rationals of height $\le 2048$ on sphere.
Image due to Stefan Kohl in this answer.


Choose an appropriate $h_\max$, perhaps using an
estimate
of the number of rational points of height at most $h_\max$ on $S(1)$.
Then scale all coordinates by the LCM of the points' denominators.
For example, for $h_\max=10$, scaling by $2^3 \cdot 3^2 \cdot 5 \cdot 7 = 2520$
would suffice to clear all denominators,
so that $S(2520)$ includes all those points at integer coordinates.
But this would not necessarily result in the minimum $r_n$ for a given $n$.
It would likely be better to use rational points that result in a small LCM.
Exact calculations on a sphere 
(for example, computing Voronoi diagrams on a sphere) often need integer points
of bounded size.

Update. The exact answer to the question in the title,
due to Dap and Gerhard Paseman, is
that a sphere of radius $\sqrt{74} \approx 8.6$ includes $120$ integer points
on its surface,
and smaller spheres include fewer than $100$ points.

REPLY [5 votes]: The sphere centred on $(1,1,1)/2$ and radius $\sqrt{131}/2\approx 5.723$ contains $24+48+48=120$ points with integer coordinates, thanks to $$2\{\pm x,\pm y,\pm z\}-(1,1,1)=\{9,5,5\},\{9,7,1\},\{11,3,1\}.$$
Successive best $a,n$ where the sphere centred on $(1,1,1)/2$ and radius $\sqrt{a}/2$ contains $n$ points with integer coordinates:
(3,8),(11,24),(27,32),(35,48),(59,72),(131,120),(251,168),(299,192),(419,216),(611,240),(659,264),(731,288),(899,
336),(971,360),(1091,408),(1691,432),(1739,480),(1811,552),(2219,576),(2651,624),(2939,696),(3251,744),(4091,792),(
4259,840),(4619,864),(5099,936),(5771,1056),(6971,1080),(7619,1104),(8291,1128),(8531,1200),(9539,1320),(11051,1488),(
12011,1560),(13859,1608),(14339,1680),(15539,1728),(18851,1776),(19211,1800),(19379,1944),(20459,1968),(22571,2088),(
25091,2112),(25451,2160),(26171,2184),(26771,2352),(28019,2376),(31379,2472),(31979,2496),(33491,2592),(36539,2736),(
38099,2784),(38939,2832),(39731,3024),(42059,3120),(49139,3144),(51939,3168),(53819,3192),(55571,3360),(58211,3432),(
59219,3672),(65771,3696),(66491,3960),(74051,4200),(87779,4416)
GAP code:
a:=[];R:=89999;for i in [1..R] do a[i]:=0;od;
for x in [1,3..299] do
 for y in [1,3..x] do
  for z in [1,3..y] do
r:=x*x+y*y+z*z; if r<=R then
if x>y and y>z and z>0 then n:=48;
 else if (x>z and z>0) or (x>y and z=0) then n:=24;
 else if x=z then n:=8;
 else if y=0 then n:=6;fi;fi;fi;fi;
a[r]:=a[r]+n;fi;od;od;od;
b:=0;for i in [1..R] do if a[i]>b then b:=a[i];Print("(",i,",",b,"),");fi;od;