Is there a difference infinite sequences (all elements are natural numbers) and functions ?
I mean for example,
Is the infinite sequence $$a_n=\left\{0,1,0,1,0,1 \cdots \right\}$$ equal to $$f(n) = \frac 12 ((-1)^n + 1) ? $$
functionssequences-and-series
Is there a difference infinite sequences (all elements are natural numbers) and functions ?
I mean for example,
Is the infinite sequence $$a_n=\left\{0,1,0,1,0,1 \cdots \right\}$$ equal to $$f(n) = \frac 12 ((-1)^n + 1) ? $$
All vectors are sequences False To a mathematician, a vector is an element of a vector space, and therefore need not be a sequence. For example, the set of all continuous real valued functions on $[0,1]$ forms a vector space, and its elements are the 'vectors' of that space. Since the most familiar example of a vector space is $\mathbb R^n$, we often use the word 'vector' to refer to any (normally finite) sequence of elements, even when the elements do not naturally form a vector space; but it is certainly incorrect to say that all vectors form sequences.
All sequences are vectors Also false, but not for the reasons you have given. If the terms of a sequence are elements of a field $F$, then that sequence is an element of the vector space, over $F$, of all sequences with terms in $F$, so it is a 'vector' in that sense. However, if the terms of the sequence are sets with no extra structure, points of a metric space etc., then it doesn't make sense to say that the sequence is a vector. Note that this has nothing to do with the sequence being infinite dimensional. There exist infinite-dimensional vector spaces; indeed, dimension as a concept doesn't enter into the definition of a vector space at all: to be a vector, we onlyneed to be able to add and subtract with other vectors, and to be multiplied by scalars. It happens that the simplest examples of vector spaces are finite-dimensional.
All sequences are functions True, at least in the sense that we can view a sequence as a function from $\mathbb N$ into some set $A$. Bear in mind, though, that this is but one formalism of the idea of a sequence; if we implemented the sequence in some other way - say, as the set of all its finite initial segments: $$ \{(a_1), (a_1,a_2), (a_1,a_2,a_3),\dots\} $$ or in any one of a number of possible ways that don't involve functions, it would still be a sequence; it just happens that the function definition is the most convenient.
All functions are sequences Certainly false, as you correctly demonstrated.
All functions are operators I'd say false, because I normally hear the word operator used to describe particular examples of functions: binary operators like $+,-,\times$ etc. or linear operators in functional analysis. Then again, I wouldn't feel it was wrong to declare that 'operator' and 'function' should be synonyms. However...
All operators are functions This is definitely true; it is certainly not the case that functions can only map numbers to numbers: in mathematics, a function can map from any set to any other set.
Sorry if some of that went over your head. The point I'm trying to make is that the concepts 'vector', 'sequence' and 'function' come from different areas in mathematics (though of course they are used together all the time), while 'function' and 'operator' are very similar words (with 'function' being the more fundamental and universal term in case of doubt). So there is no such hierarchy in mathematics. But well done for exploring and trying to find patterns; keep it up and you'll discover some really beautiful ones.
I shall assume that with "cannot be given by a mathematical function" you mean that there does not exist a finite length formula (or algorithm) that describes the function exactly.
First, there exists such a sequence where we even have $a_i\in\{0,2\}$ for each $i$: Just ensure that $\sum_{i=1}^n a_i=2\lfloor \alpha n\rfloor$ by letting $$a_n=\begin{cases}0&\lfloor \alpha n\rfloor =\lfloor \alpha (n-1)\rfloor\\ 2 & \text{otherwise} \end{cases} $$
Unfortunately, if $\alpha$ is computable, this $a_n$ is "given by a mathematical function" - not what you want.
If $0<\alpha<1$, we will have infinitely many $n$ with $a_n=0$ and infinitely many $n$ with $a_n=2$, hence also inifinitely many $n$ with $a_n=0$ and $a_{n+1}=2$. It is allowed to replace an arbitrary subset of these cases these with $a_n=a_{n+1}=1$ without changing the limit behaviour. As there are uncountably many such subsets, not all can be described the only countably many formulas, hence at least some of these "cannot be given by a mathematical function".
We are still left with the special cases $\alpha=0$ and $\alpha=1$. For $\alpha=1$, we would start with all $_n=0$ and so lack the infinitely many $0$-$2$ steps we used to produce uncountably many sequence variations. However, if we set $a_n=2$ whenever $n$ is a perfect square, we still have limit $0$ but now have infinitely many cases of $a_n=0$, $a_{n+1}=2$ again, and can continue as above. The same argument works for $\alpha=1$ with the roles of $0$ and $2$ exchanged.
Best Answer
There is not. Most people define sequences as functions from the natural numbers, $0,1,2,3,\ldots$
You can see this on the Wikipedia page and in almost any "higher level" mathematics textbook which defines sequences.
In your notation, instead of $a_{n}$ some authors may even write $a(n)$ to make this clear.