First, let's say we work with these two functions:
\$L(n)\$ is the maximum amount of LEDs that can be driven from \$\mathsf{n}\$ pins.
\$p(n)\$ is the minimum amount of pins needed to drive \$\mathsf{n}\$ LEDs.
1:1-method
This one is easy:
$$L(n)=n$$
$$p(n)=n$$
A diode matrix
At first, we need to determine the most efficient diode matrix. For example, you could divide 4 pins into two sets of 2, or one set of 1 and one of 3. Obviously, the amount of LEDs is given by \$\mathsf{length\cdot{}width}\$. We can say \$\mathsf{width=n-length}\$, so the amount of LEDs is: \$\mathsf{length\cdot{}(n-length)=-length^2+n\cdot{}length}\$. Given an \$\mathsf{n}\$, this is a parabola, which has a maximum when \$\mathsf{length=\frac{n}{2}}\$. You can also do this on gut feeling. So, the maximum amount of LEDs is reached when the two sets have an equal amount of pins, or differ only 1, in case of an odd number of pins. We can now say:
$$L(n)=\lfloor{}\frac{n}{2}\rfloor{}\cdot\lceil{}\frac{n}{2}\rceil{}$$
Also, we can now easily understand the function \$\mathsf{p(n)}\$:
$$p(n)=
\begin{cases}
1&\text{ for }n=1\\
\lceil{}\sqrt{n}\rceil&\text{ for }n\gt1
\end{cases}$$
I just included the cases for 1, as this is a special case. Normally, you can just use the second function.
Charlieplexing
In this method, we have two LEDs between every set of two pins. We can calculate the amount of sets of two pins with:
$$(n-1)+(n-2)+\dots+1 = \frac{n\cdot(n-1)}{2}=\frac{n^2-n}{2}$$
Now we can say that:
$$L(n)=2\cdot\frac{n^2-n}{2}=n^2-n$$
We saw that the amount of pairs of pins equals \$\mathsf{n\cdot(n-1)}\$. With some reverse thinking, this leads to:
$$p(n)=
\begin{cases}
1 &\text{ for } n=1\\
2\cdot\lfloor\sqrt{n}\rfloor-1 &\text{ for } n\gt1
\end{cases}$$
I just included the cases for 1, as this is a special case. Normally, you can just use the second function.
Other methods
I'm not aware of any other methods, as of Tuesday march 12, 2013.
Best Answer
To control four LEDs:
simulate this circuit – Schematic created using CircuitLab
To get both LEDs on a particular pin lit, toggle the pin at a few hundred Hz.
Note that this setup requires that the forward voltage of the LEDs be less than Vcc/2.
Note also that the resistors consume power all of the time, not just when the LEDs are on.