Here's more info. The 17.817 method of calculating fret spacing is really only a simplification of this:

distance from bridge = L / (2 ^ (F / 12))

L= string length

F= fret number

This is a more general solution that can calculate the position of any single fret.

Imagine that a spiral could roll along a string (with the center of the spiral at the closer frets) and contact a fret every 30 degrees. What would that spiral be?

The general formula for a log spiral in polar coordinates is here.