I have a 20 - 0 - 20 transformer which is giving about +/-27 V after rectification. I need +20 VDC, +16 VDC, 5 VDC and -20 VDC. I thought of regulating from 27 to 20 then 20 to 16, and finally 16 to 5. Will it work using cascaded LM317s or LT1085s?
You can chain regulators as you suggest BUT the lower voltages will incur large inefficiencies & also large power dissipation in the regulators.
Efficiency can be improved with switching regulators.
This (10 year old!) SE answer of mine to "My linear voltage regulator is overheating very fast" should be useful.
Linear regulator dissipation can be greatly reduced at lower voltages by using a series input resistor sized to provide adequate voltage at max current.
eg providing the 5V regulator with a resistor feed from 27V, if you assume a headroom of say 3V is needed and the regulator takes 1.25v for itself then
R = Vdrop / Imax
= (27 - 3 - 1.25 - 5)/Imax
eg for say 0.5A max at 5V R = 17/0.5 <= 34 Ohm.
Resistor power dissipation will be Imax^2 x R or in this case 8.W watts.
A 10 Watt resistor would be very marginally suitable and a 20 W one advisable.
Use of air cooled resistors allows use without heatsinks.
Use of series resistors also allows substantial reduction of regulator heatsinks.