How can the output be 16.5V when you showed the input is only 12V?in 1500 to 5000 ohm the output voltage is 16.50v
Did you buy a fake LM317 IC from ebay?
An LM317 needs a 120 ohm resistor from its output to its ADJ pin. A more expensive LM117 uses a 240 ohm resistor. If the resistor value is too high then the output voltage of some LM317 ICs goes higher than it should when there is no load.
The pins on an LM317 are 123 when you look at the epoxy with the part number printed on it, not when looking at the metal back.