Let (an) be a sequence of real numbers, and let E = {an : n ∈ N} be the range of (an). Prove that (an) has a subsequence converging to p iff either p appears infinitely many times in (an) or p is an accumulation point of E.

For this if and only if is it showing that either it appears infinitely many times or p is an accumulation point of E?

To be perfectly honest I'm not sure how to even think about this one.