Equation of 1 22 333 4444 55555 sequence?

孤者浪人 提交于 2019-12-10 12:27:55

问题


i need to find 1 22 333 sequence formula/equation.

I write this code for getting number like that but i need to find equation of this sequence

Code:

for (int i = 1; i <= 9; i++)
{
    for (int j = 0; j < i; j++)
    {
        Console.Write(i);
    }

    Console.Write("\n");
}

With this code I get this results

1
22
333
4444
55555
666666
7777777
88888888
999999999

Also Latex code line should works for me to.

I mean equation somethings like this for example:


回答1:


From the sum of a geometric progression, the value of the (n)th term is

n*(power(10, n) - 1)/9

where power(a, b) raises a to the bth power.




回答2:


The number a(n) that consists of n concatenated to itself n times is

, where D(n) is the number of digits of n. This is a well-known Smarandache Sequence.

来源:https://stackoverflow.com/questions/37113781/equation-of-1-22-333-4444-55555-sequence

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!