For indexed family wikipedia states: Formally, an indexed family is the same thing as a mathematical function; a function with domain J and codomain X is equivalent to a family of elements of X indexed by elements of J
For sequence wikipedia states: Formally, a sequence can be defined as a function whose domain is a countable totally ordered set, such as the natural numbers.
Both can have repeated elements and their order matters. Is there any difference between this two?