Looping on analog read giving strange readings

1M is way higher than the recommended maximum input impedance of 10k...

Just don't bother reading an unconnected pin!