In how many ways

Calculus Level 2

F ( n ) = 1 + ( 1 + 2 ) + ( 1 + 2 + 3 ) + ( 1 + 2 + 3 + + n ) F(n)= 1 +(1+2)+(1+2+3)+\cdots (1+2+3+\cdots +n)

For F ( n ) F(n) as defined above, find the value of F ( 2020 ) F(2020) .

For fun purpose one may wish to solve it without using the standard known formula.


The answer is 1375775540.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Naren Bhandari
May 31, 2020

Find 1 + ( 1 + 2 ) + ( 1 + 2 + 3 ) + + ( 1 + 2 + 3 + + n ) 1+(1+2)+(1+2+3)+\cdots +(1+2+3+\cdots+n) We write the above finite sum in terms of double dependent sum as

Solution 1 (Using standard formula) F ( n ) = k = 1 n m = 1 k m = 1 2 k = 1 n k ( k + 1 ) = 1 2 ( n ( n + 1 ) ( 2 n + 1 ) 6 + n ( n + 1 ) 2 ) = n + 2 3 T n F(n)=\sum_{k=1}^{n}\sum_{m=1}^{k} m =\frac{1}{2}\sum_{k=1}^{n}k(k+1)=\frac{1}{2}\left(\frac{n(n+1)(2n+1)}{6}+\frac{n(n+1)}{2}\right)=\frac{n+2}{3}T_n

Solution 2 (Without using standard formula)

Now suppose we try to evaluate the sum without using the standard formula. To do so we note that for k n k\leq n 1 + 1 + + 1 n + 2 + 2 + + 2 n 1 + + 10 + 10 + + 10 n 9 + m + m + + m n m + 1 \underbrace{1+1+\cdots +1}_{n}+\underbrace{2+2+\cdots +2}_{n-1} +\cdots +\underbrace{10+10+\cdots +10}_{n-9}+\cdots \underbrace{m+m+\cdots +m}_{n-m+1} So F ( n ) = k = 1 n m = 1 k m = k = 1 n m = 1 n k + 1 k = k = 1 n m = 1 n k k = 1 n m = 1 k ( m + 1 ) + 2 k = 1 n k F(n)=\sum_{k=1}^{n} \sum_{m=1}^{k}m = \sum_{k=1}^{n}\sum_{m=1}^{n-k+1} k=\sum_{k=1}^{n}\sum_{m=1}^{n} k -\sum_{k=1}^{n}\sum_{m=1}^{k}(m+1)+2\sum_{k=1}^n k F ( n ) = k = 1 n + 2 k = 1 n k 2 k = 1 n m = 1 k m 3 F ( n ) = ( n + 2 ) k = 1 n k F ( n ) = ( n + 2 ) 3 k = 1 n k F(n)=\sum_{k=1}^{n+2}\sum_{k=1}^n k-2\sum_{k=1}^{n}\sum_{m=1}^k m \Rightarrow 3F(n)=(n+2)\sum_{k=1}^n k \Rightarrow F(n)=\frac{(n+2)}{3}\sum_{k=1}^n k = n + 2 3 k = 1 n ( k + ( n k + 1 ) 2 ) = n + 2 6 k = 1 n ( n + 1 ) = n ( n + 1 ) ( n + 2 ) 6 = ( n + 2 3 ) =\frac{n+2}{3}\sum_{k=1}^n\left(\frac{k+(n-k+1) }{2}\right) = \frac{n+2}{6}\sum_{k=1}^{n}(n+1)=\frac{n(n+1)(n+2)}{6}={n+2\choose 3}

Solution 3 (Using combinatorial identities) k = 1 n m = 1 m m = k = 1 n T k = k = 1 n ( k + 1 2 ) = 1 4 ( 2 n + 2 3 ) + ( n + 1 2 ) = s i m p l i f y ( n + 2 3 ) \sum_{k=1}^{n} \sum_{m=1}^{m}m =\sum_{k=1}^{n}T_k=\sum_{k=1}^{n}{ k+1\choose 2} =\frac{1}{4}{ 2n+2\choose 3} +{ n+1\choose 2} \overbrace{=}^{simplify} {n+2\choose 3} Solution 4 : One can try up with ordinary generating function.

Kano Boom
May 31, 2020
1
2
3
4
5
6
7
def F(x):
    return sum([i for i in range(1, x+1)])

def G(x):
    return sum([F(i) for i in range(1, x+1)])

print(G(2020))

Edited the solution to make it more elegant

Kano Boom - 1 year ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...