问题
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 b
th 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