Can we devise a formula for a series like this,
S=n+7(n-1+7(n-2+7(n-3+.........)))
when n=1 S=1 first three terms are 1,9,66 someone says it has a formula but i cant find any help!!!
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3821 |
3 | Benq | 3736 |
4 | Radewoosh | 3631 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3388 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
Name |
---|
https://www.wolframalpha.com/input/?i=sum(7%5Ei+*+(n+-+i)+for+i+%3D+0...n)
S(n + 1) = n + 1 + 7·S(n)
Now this can be solved by standart methods.
I can offer to read about generating function (Link). In short:
S(0) = 0
S(n) = n + 7*S(n — 1)
Multiply first line by x^0, ans second by x^n and sum all lines. Assume S(0)*x^0 + S(1)*x^1+.... = G(x):
G(x) = 7xG(x) + (1 * x^1 + 2 * x^2 + 3 * x^3 + ....)
Expression in brackets can be simplify to x/(1-x)^2. So we can find formula:
G(x) = x/((1-x)^2*(1-7x)) = (7/(1 — 7x) — 1/(1 — x) — 6/(1-x)^2)/36. And we can expand all fractions:
1/(1 — ax) = (ax)^0 + (ax)^1 + ...;
1/(1 — x)^2 = (1 * x^0 + 2 * x^1 + 3 * x^2 + ...);
Calculate all coeffs in left part and all coeffs in right part. And we get finally formula:
S(n) = (7^(n + 1) — 7 — 6n)/36. Check formula for first n:
S(0) = 0;
S(1) = 1;
S(2) = 9;
S(3) = 66;
Thank you very much that helped a lot.........