TITLE: The "pepperoni pizza problem"
QUESTION [94 upvotes]: This problem arose in a different context at work, but I have translated it to pizza.
Suppose you have a circular pizza of radius $R$. Upon this disc, $n$ pepperoni will be distributed completely randomly. All pepperoni have the same radius $r$.  
A pepperoni is "free" if it does not overlap any other pepperoni. 
You are free to choose $n$.
Suppose you choose a small $n$. The chance that any given pepperoni is free are very large. But $n$ is small so the total number of free pepperoni is small. Suppose you choose a large $n$. The chance that any given pepperoni is free are small. But there are a lot of them.
Clearly, for a given $R$ and $r$, there is some optimal $n$ that maximizes the expected number of free pepperoni. How to find this optimum?
Edit: picking the answer
So it looks like leonbloy's answer given the best approximation in the cases I've looked at:
 r/R          n* by simulation     n_free (sim)     (R/2r)^2
 0.1581       12                   4.5              10
 0.1          29                   10.4             25
 0.01         2550                 929.7            2500

(There's only a few hundred trials in the r=0.01 sim, so 2550 might not be super accurate.)
So I'm going to pick it for the answer. I'd like to thank everyone for their contributions, this has been a great learning experience.
Here are a few pictures of a simulation for r/R = 0.1581, n=12:

Edit after three answers posted:
I wrote a little simulation. I'll paste the code below so it can be checked (edit: it's been fixed to correctly pick points randomly on a unit disc). I've looked at two three cases so far. First case, r = 0.1581, R = 1, which is roughly p = 0.1 by mzp's notation. At these parameters I got n* = 12 (free pepperoni = 4.52). Arthur's expression did not appear to be maximized here. leonbloy's answer would give 10. I also did r = 0.1, R = 1. I got n* = 29 (free pepperoni = 10.38) in this case. Arthur's expression was not maximized here and leonbloy's answer would give 25. Finally for r = 0.01 I get roughly n*=2400 as shown here:
Here's my (ugly) code, now edited to properly pick random points on a disc:
from __future__ import division
import numpy as np
# the radius of the pizza is fixed at 1
r = 0.1   # the radius of the pepperoni
n_to_try = [1,5,10,20,25,27,28,29,30,31,32,33,35]  # the number of pepperoni
trials = 10000# the number of trials (each trial randomly places n pepperoni)

def one_trial():
    # place the pepperoni
    pepperoni_coords = []
    for i in range(n):
        theta = np.random.rand()*np.pi*2 # a number between 0 and 2*pi
        a = np.random.rand()           # a number between 0 and 1
        coord_x = np.sqrt(a) * np.cos(theta) # see http://mathworld.wolfram.com/DiskPointPicking.html
        coord_y = np.sqrt(a) * np.sin(theta)
        pepperoni_coords.append((coord_x, coord_y))

    # how many pepperoni are free?
    num_free_pepperoni = 0
    for i in range(n): # for each pepperoni
        pepperoni_coords_copy = pepperoni_coords[:]  # copy the list so the orig is not changed
        this_pepperoni = pepperoni_coords_copy.pop(i) 
        coord_x_1 = this_pepperoni[0]
        coord_y_1 = this_pepperoni[1]
        this_pepperoni_free = True
        for pep in pepperoni_coords_copy: # check it against every other pepperoni
            coord_x_2 = pep[0]
            coord_y_2 = pep[1]
            distance = np.sqrt((coord_x_1 - coord_x_2)**2 + (coord_y_1 - coord_y_2)**2)
            if distance < 2*r:
                this_pepperoni_free = False
                break
        if this_pepperoni_free:
            num_free_pepperoni += 1

    return num_free_pepperoni

for n in n_to_try:
    results = []
    for i in range(trials):
        results.append(one_trial())
    x = np.average(results)
    print "For pizza radius 1, pepperoni radius", r, ", and number of pepperoni", n, ":"
    print "Over", trials, "trials, the average number of free pepperoni was", x
    print "Arthur's quantity:", x* ((((1-r)/1)**(x-1) - (r/1)) / ((1-r) / 1))

REPLY [8 votes]: A First Approximation
Let $p$ be the probability that a pepperoni is not in conflict with one randomly placed pepperoni, and $P$ the probability that a pepperoni is free.
The exact expression for $p$ is the area suitable for another pepperoni over the total area where pepperoni can be placed :
$$
p = \frac{\pi (R-r)^2 - A}{\pi (R-r)^2}
$$
Where $A$ is the area of the portion of a circle of radius $2r$ centered at the pepperoni center that is inside the area where pepperoni can be placed. I could not find an analytic formula for $A$ when the pepperoni is close to the border. Instead, I use the approximation that the pepperoni always covers the same area, regardless of where it is placed. 
$$A \approx \pi (2r)^2$$
And we have : 
$$
p = \frac{\pi (R-r)^2 - \pi (2r)^2}{\pi (R-r)^2} = \frac{(R-r)^2 -  (2r)^2}{(R-r)^2}
$$
This approximation is good when the radius of the pizza is large compared to the radius of a pepperoni.
Now, the probability that pepperoni $i$ is free when $n$ pepperoni are placed: 
$$P = p^{n-1} $$
And the expected number of free pepperoni is : 
$$E_n = n p^{n-1}$$
This function looks like this.
To obtain the maximum, we set the derivative equal to 0 : 
$$p^{n-1} + np^{n-1} \ln(p) = 0 \implies n = \frac{-1}{ \ln(p)}$$
The maximum is either the ceiling or the floor of this value.
$$E_n = \max\left\{\left\lfloor \frac{-1}{ \ln(p)} \right\rfloor p^{\lfloor \frac{-1}{ \ln(p)} \rfloor - 1}, \left\lceil \frac{-1}{ \ln(p)} \right\rceil  p^{\lceil \frac{-1}{ \ln(p)}\rceil - 1} \right\}$$
Now some numbers : If $R= 30$cm, $r=2$cm, we have $p\approx 0.98$. Then :
$$ E_{max} = \max\{48 \times 0.98^{48-1}, 49 \times 0.98^{49-1}\}\approx \max\{18.1678, 18.1669\} = \boxed{18.1678 }$$
Edit : A Better Approximation of A
I found a better way to approximate $A$, the average area in which another pepperoni cannot be placed. It is : 
$$
A(r')= \left\{ \begin{array}{cc}
\pi (2r)^2 & \mbox{ if } r' < R-3r \\
\frac{\pi (2r)^2}{2} & \mbox{ if }  R-3r < r' < R-r
\end{array}
\right.
$$
Where $r'$ is the distance between the center of the pizza and the center of the pepperoni. I think this formula desserves a bit of explaining. When the pepperoni is at distance less than $R-3r$ from the center of the pizza, all the points in a $2r$ radius are not suitable for a pepperoni. If the distance is larger than $R-3r$, some of the points in the circle of $2r$ radius are outside the zone where pepperoni can be placed (The circle of $R-r$ radius).When a pepperoni is inside that region, we consider that the area not suitable for another pepperoni is on average half the area of the circle. This correspond to making the approximation that the border of the pizza is flat. Again, for a large pizza, this approximation becomes more negligible.
Now, the average for $A$ becomes : 
$$
\begin{align}
A =& \frac{\int\limits_{0}^{2\pi} \int\limits_{0}^{R-r} A(r') r' dr' d\theta }{\int\limits_{0}^{2\pi} \int\limits_{0}^{R-r}  r' dr' d\theta} \\
  =& \frac{2\pi \left[\int\limits_{0}^{R-3r} \pi(2r)^2 r' dr' +  \int\limits_{R-3r}^{R-r} \frac{\pi(2r)^2}{2} r' dr'\right]}{\pi (R-r)^2} \\
  =& \frac{2\pi r^2}{(R-r)^2}\left[ (R-3r)^2 + (R-r)^2 \right]
\end{align}
$$
And the probability $p$ is : 
$$
\begin{align}
p =& \frac{\pi(R-r)^2 - \frac{2\pi r^2}{(R-r)^2}\left[ (R-3r)^2 + (R-r)^2 \right]}{\pi(R-r)^2} \\
 =& 1-\frac{2r}{(R-r)^4}\left[ (R-3r)^2 + (R-r)^2 \right]
\end{align}
$$
And the rest of the equations stay unchanged.
Now, when $r/R = 0.1$, I get a total of 112 pepperoni placed, with an expected value of 31.74.
For $r/R = 0.01$, I get 2449 pepperoni placed, with an expected value of 901.58.