Following was the homework question for my analysis class.
Given any sequence $x_n$ in a metric space $(X; d)$, and $x \in X$, consider the function $f : \mathbb N^\ast = \mathbb N \cup \{\infty\} \to X$ defined by $f(n) = x_n$, for all $n\in \mathbb N$, and $f(\infty) = x$.
Prove that there exists a metric on $\mathbb N^\ast$ such that the sequence $x_n$ converges to $x$ in $(X; d)$ if and only if the function $f$ is continuous.
Our teacher said that since $\infty$ is the only accumulation point of $\mathbb N^\ast$, if $f$ is continuous at $\infty$, it is continuous on $\mathbb N^\ast$. So, it is enough to show it is continuous at $\infty$.
But I did not understand why this is true. It is also possible that I misunderstood what my teacher meant. If you can tell me the statement is correct or not and why, I would be grateful.
Thanks in advance.