I need, in proper and widely accepted mathematical form, to algebraically represent each of all the digits in any given integer. Here is my mathematically illiterate way of conveying this idea to you: $$a_{1}a_{2}\dots a_{n-1}a_{n}\quad\text{where}\quad a_{1}\quad\text{would match first digit of given integer,}\quad a_{2}\quad\text{would match second, and so on}$$
Any help appreciated.
The $k^{th}$ digit from the right (origin $0$) is
$$\left\lfloor\frac{n}{10^k}\right\rfloor\bmod 10.$$
E.g., $n=20519$, $k=2$,
$$\frac{20519}{10^2}=205.19,\\\left\lfloor205.19\right\rfloor=205,\\205\bmod10=5.$$
The number of digits is
$$\left\lfloor\log_{10}n\right\rfloor+1.$$
Note the $k$ can very well be negative.