First than nothing, sorry for my english, I'm not native.
I was wondering how I could represent mathematically, each digit of a number.
Example: 172
X = 172.
How can I represent each digit of the number x, algebraically?
Another example: n=420 so
n1+n2+n3 => 6
How is the summation, or the multiplication of each of the digits, mathematically represented?
Thanks, and sorry for my english.
I do not think there is a standard convention for this that everyone uses. Instead, you have a choice among several different conventions you could follow.
First there is the choice of how to represent each digit by itself. A number is not the same thing as a string, even when we talk about the digits of its base-ten representation. Even in a computer, depending on which system you are using you might find the smallest-value bits are in the lowest-numbered bytes, or you might find they are in the highest-numbered bytes.
Mathematically, it's usually preferable to number the digits whichever way makes it easier to do whatever you need to do with them. Sometimes people find it convenient to say that the "$0$th" digit is the one in the units/ones place, the $1$st digit is in the tens place, and so forth; then then can say that the place value of the digit in the $k$th place is $10^k,$ so if the digit in that place is $d_k$ then its total contribution to the number's value is $d_k \times 10^k.$ But you can just as easily say the first digit is the one on the left and the last digit is the one on the right, as long as you don't find that this becomes confusing later.
Next there is how you put the digits together. Everyone will understand what you mean if you write something like $$n_1 \times 10^2 + n_2 \times 10^1 + n_3 \times 10^0 \text{ where } 0 \leq n_k \leq 9$$ or $$d_2 \times 10^2 + d_1 \times 10^1 + d_0 \times 10^0 \text{ where } 0 \leq d_k \leq 9.$$
It is then easy to represent sums and products of digits, for example $$ \sum_{k = 1}^3 n_k = n_1 + n_2 + n_3 $$ and $$ \prod_{k = 0}^2 d_k = d_2 \times d_1 \times d_0. $$
You can write the notation $n_1 \times 10^2 + n_2 \times 10^1 + n_3\times 10^0$ a little more compactly as $\sum_{k = 1}^3 n_k 10^{3-k}.$ You may judge whether this notation is helpful or confusing.
If you must write representations of the digits of many numbers you might consider just placing the symbols for each digit in a row the way we write a number with known digits. If you do this, however, you should explain what you mean by the notation before you use it. For example, you might say:
This will help to explain to readers that when you write $n_1n_2n_3$ you mean a three-digit number, not three numbers that are multiplied together. Of course then if you do want to multiply the digits you will have to use some kind of explicit multiplication operator such as $\times$ or use the $\prod$ notation. So the three-digit number $n_1n_2n_3$ has sum $n_1+n_2+n_3$ and product $n_1\times n_2\times n_3$.
There are other things people sometimes find convenient to do such as defining a function $d(n)$ that gives the number of digits in the base-ten representation of $n,$ so that one can write $$ n = n_1n_2\ldots n_{d(n)},$$ with sum of digits $$ \sum_{k = 1}^{d(n)} n_k = n_1 + n_2 + \cdots + n_{d(n)} $$ and product $$ \prod_{k = 1}^{d(n)} n_k = n_1 \times n_2 \times \cdots \times n_{d(n)}. $$
It's all a matter of what you need. But in any case it's a good policy to explain how you are representing the digits of numbers rather than just using a notation and expecting the reader to figure it out.