Here's the theorem:
$\lim_{x\to a}f(x) = L$ iff for all $a_n$ such that $a_n$ converges to $a$, $f(a_n)$ converges to $L$.
I managed to prove the forwards direction, but it's the backwards direction that's confusing me. Here's the problem I ran into when I tried to prove it.
given: If $a_n$ converges to $a$, $f(a_n)$ converges to $L$.
prove: $\lim_{ x\to a}f(x) = L$.
proof: We know that the sequence where every term is a converges to $a$. By the given, that means that the sequence where every term is $f(a)$ converges to $L$. However, we also know that the sequence where every term is $f(a)$ converges to $f(a)$. Thus, based on the given, $f(a) = L$.
So, based on what I got, it seems that in order for the given to hold true, I would have to be given a function where $f(a) = L$, and then prove that $f(x)$ is continuous at $x = a$. Am I missing something?