How to simplify this power equation? I need a function such that if input is $n$ it outputs an $n$-digit number. I need a mathematical function. 
For example: 
$$\begin{align}\mathrm{ANY}(2) &= 22 \\
\mathrm{ANY}(3) &= 333 \\
\mathrm{ANY}(n) &= nnn\ldots n \quad (n \text{ times})\end{align}$$
I think $\mathrm{ANY}(n)$ is something like:
$$\begin{align}\mathrm{ANY}(2) &= (10^1 + 10^2) * 2 \\  
\mathrm{ANY}(3) &= (10^1 + 10^2 + 10^3) * 3 \\
\mathrm{ANY}(n) &= (10^1 + 10^2 + \ldots + 10^n) * n\end{align}$$
My question is can we further simplify  the equation: $10^1 + 10^2 + \ldots +  10^n$? Or is it not possible? 
Additionally, I need just any $n$-digit number on $n$ input, not necessary like $22$, $333$, $4444$, $\ldots$. In case simplification is not possible then suggest me any other function? I have no much idea if its possible.
Also domain to my $\mathrm{ANY}$ function can be $1$ to $100$.     
I need to solve some problem in computer science. 
 A: I suppose simpler functions would be $\mathrm{any}(n) = 10^{n-1}$, e.g. outputting $\mathrm{any}(3) = 100$, or $\mathrm{any}(n) = 10^n - 1$, e.g. outputting $\mathrm{any}(3) = 999$. 
To get the exact function you specified, you could use the formula for geometric series to obtain $\mathrm{any}(3) = (\frac{10^{n} - 1}{9}) \cdot n$. Note that this does not give you an  $n$-digit number for $n \geq 10$.
A: This one gives you only till $n\leq 9$. You could take the geometric series which says that 
$$\sum_{k=0}^n q^k = \frac{q^{n+1}-1}{q-1}$$
which is in your case 
$$\frac{1}{10}\cdot \left( \frac{10^{n+1}-1}{9}-1\right)\cdot n$$
the $-1$ is there because you don't have the naught term.
If you only want an arbitrary $n$ digit number take 
$$10^{n-1}$$
if you want alle the same digit take 
$$\frac{10^n-1}{9} \cdot \text{your favorite digit}$$
To get any number from 10  till 99 with your exact formula take 
$$\frac{1}{100} \cdot \sum_{k=1}^\frac{n}{2} 100^k  \cdot n=\frac{1}{99} \cdot (10^n-1)\cdot n$$ 
for $n$ even and 
$$\frac{1}{10} \cdot \sum_{k=1}^\frac{n-1}{2} 100^k \cdot n + \left\lfloor\frac{n}{10}\right\rfloor=\frac{1}{99} (10^{n}-10)\cdot n +\left\lfloor\frac{n}{10}\right\rfloor$$
A: so if you are okay with
any(1)=1
any(2)=11
any(3)=111
and so on then
$$any(N)=\frac{10^N-1}{9}$$
will work for any number of digits so the domain is all natural numbers. You can get a number with whatever number of digits you need.
