Andy Setlow has answered his own question.
The thermal energy of a particle is linearly proportional to the temperature. The energy of a photon is inversely proportional to its wavelength.
In conditions of local thermodynamic equilibrium (LTE) between radiation and matter, the average particle and photon energies are equal. Hence, under the stated LTE condition which is implied by the question, temperature is inversely proportional to wavelength.
More exactly, and except for a small numerical factor, T = (hc/k)/L ... where L represents wavelength, i.e. T = constant/L (h, c and k are universal physical constants)
In the examples given, there is a common factor of 3 in the ratios. That particular value is simply a consequence of the choice of units for temperature and distance. The fundamental inverse relationship between T and L is independent of the units.