Is a sequence a function?

I'd say yes.

Each term is numbered from 1 on, so if the positive integers are used for the domain, no number appears twice.

Thanks!

Yes, a sequence can be considered as a special type of function. A function is a relation that assigns each input value from a set called the domain to a unique output value from a set called the codomain. In the case of a sequence, the domain is typically the set of natural numbers (or a subset of it), and the codomain is usually a set of numbers (such as real numbers).

A sequence is a well-defined ordered list of numbers, where each number in the list corresponds to a specific position or index in the sequence. In this sense, we can think of a sequence as a function that maps the natural numbers to the numbers in the sequence.

For example, consider the sequence of even numbers: 2, 4, 6, 8, ... In this case, we can define a function f: N → N, where N is the set of natural numbers, that maps each natural number n to the nth even number. So, for example, f(1) = 2, f(2) = 4, f(3) = 6, and so on.

It is important to note that while a sequence can be considered as a function, not all functions are sequences. Functions can have a more general mapping between the domain and codomain, whereas sequences have a specific pattern or order.