While solving a problem on compactness
, I just came across this function, I need to know whether it is well defined or not and if is well defined then need to prove that this function is continuous.
Let $(X,d)$ be a non-compact metric space and $\{x_n\}$ be a sequence which has no accumulation points. Then show that there exits a continuous real-valued unbounded function.
In MathStackExchange, one defined (Existence of a continuous function which does not achieve a maximum. ) $g(x)=\inf_nd(x,a)+1/n$ and then asked to take $f(x)=\frac{1}{g(x)}$ now $g(x)$ is not zero anywhere and he said $g(x)$ is continuous and $f(x_n)=n $ and so the function $f$ is continuous and unbounded.
My doubt is this function $g$ well defined? If yes what does it really mean? what is that 1/n? how does it varies? If this function is well defined, kindly help me to prove how that it is continuous.