From http://www.national.com/kbase/category/Power.html#157
How do I calculate the values needed for the feedback resistors of adjustable linear regulators, such as the LM317?
Two resistors are used to set the value of the output voltage for adjustable regulators.
For adjustable standard linear regulators, such as LM317 and LM337, R1 is the resistor between Vout and ADJ, while R2 goes from ADJ to ground.
The values of the resistors are determined from this formula: Vout = Vref (1 + R2 / R1). R1 is generally specified on the datasheet, and you must solve for R2.
A more precise form of the equation allows for adjust pin bias current: Vout = Vref (1 + R2 / R1) + (Iadj * R2).
Vref usually is 1.25V for linear (LM317/337 type) regulators... For linear regulators, R1 is usually 240Ω. Iadj is typically 50µA for the LM317/337. See Application Note AN-181, "3-Terminal Regulator is Adjustable", for more information about the LM317.
From AN-181 (which is really at http://www.national.com/an/AN/AN-181.pdf )
a divider R1 and R2 is connected from the output to ground as is shown in Figure 2. The 1.2V reference across resistor R1 forces 5 mA of current to flow. This 5 mA then flows through R2, increasing the voltage at the adjustment terminal and therefore the output voltage. The output voltage is given by:
Vout = 1.2V * (1 + R2/R1) + (50uA * R2)
The 50 µA biasing current is small compared to 5 mA and causes only a small error in actual output voltages.