11111
Guy, forget the lm317, just use 7805, feed the 9v at the input and you get a clean 5v output.
but if yu really want to use the lm317 then do this:
have r1 = 220 ohms, and for r2 -> have 470 ohm or 560 ohm resistor in series with 1k pot, this way you'll get a total resistance of r2 between apx 500ohms-1500 ohms, and that'll give you a nice variable voltage between 4 and 9 volts
the reason for the 470 or 560 resistor is that, you don't want to have r2 as 0 ohms if yu turn the pot all the way in one direction