Let me introduce my problem. I'm creating a little enigma for a website in which I want to use a specific thing I called "part of a number".
Definition : The part of a number $N$ (which not begins by a $0$) of $p$ digits $(p>1)$ is any number of maximum $p-1$ digits read from the left to the right in the number $N$.
Ex : If $N=10023$ the set of its parts is
$$\mathcal{P}=\{1,0,0,2,3,10,00,02,23,100,002,023,1002,0023\}$$ It is forbidden to read the number as if it was "cyclic", for example $231$ is not a part of $N$
Now the goal is to calculate the sum of all parts of a number. I decided to use $\sigma$ to be the symbol to mean "part of" so what I am trying to calculate is $$\sum_{i=1}^{\sharp \mathcal{P}} \sigma_i(N)$$
So, before to start with a number of $p$ digits I tried to find a pattern for small numbers. I write $N=a_p a_{p-1} \text{...}a_2 a_1$.
I found $$\begin{align} &\sum_{i=1}^{\sharp \mathcal{P}} \sigma_i(a_2 a_1)=1a_2+1a_1 \\ &\sum_{i=1}^{\sharp \mathcal{P}} \sigma_i(a_3 a_2 a_1)=11 a_3 + 12 a_2 +2 a_1\\ &\sum_{i=1}^{\sharp \mathcal{P}} \sigma_i(a_4 a_3 a_2 a_1)=111 a_4 + 122 a_3 +23 a_2+3a_1\\ \end{align}$$
Now we can conjecture about the formula for a number $N$. We can see before, if $N$ has $4$ digits then after the sign "equal" we can find this order, four numbers $1$, three numbers $2$ and two numbers $3$. And we need to put first and second the concatenation of $p-1$ of these numbers taken in the same order and continue by decreasing by one number each time.
So for $N=a_p a_{p-1} \text{...}a_2 a_1$, the sum of all parts should begin by $p$ numbers $1$ then one number 1 with $p-1$ number $2$ etc ... and then $$\sum_{i=1}^{\sharp \mathcal{P}} \sigma_i(a_p a_{p-1} \text{...}a_2 a_1)=\underbrace{1...1}_{p-1 \text{ times}}a_p + 1\underbrace{2...2}_{p-2 \text{ times}}a_{p-1} + ... +(p-1)a_1$$
OK, so I hope there are no typos, and my question is how should I do (usage of which notations, how should I organise my work) to make my proof ? Because it looks really weird.
Thank you in advance.
EDIT : $p-1$ and $p-2$ in last formula