The function f ( x ) is such that f ( x ) + f ( x − 1 ) = x 2 If f ( 1 9 ) = 9 4 . Then find the value of
f ( 1 9 ) + f ( 2 0 ) + f ( 2 1 ) + … + f ( 1 0 1 )
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.
Best Solution
I used the method of Sujoy Roy, but I came up with the following expression from scratch:
x = 0 ∑ n ( 2 x + 1 ) 2 = 3 ( n + 1 ) ( 2 n + 1 ) ( 2 n + 3 )
Obviously, the value of ∑ x = 0 n ( 2 x + 1 ) 2 can be obtained using computer.
The expression:
S = f ( 1 9 ) + f ( 2 0 ) + f ( 2 1 ) + . . . + f ( 1 0 1 )
= f ( 1 9 ) + ( f ( 2 0 ) + f ( 2 1 ) ) + ( f ( 2 2 ) + f ( 2 3 ) ) + . . . + ( f ( 1 0 0 ) + f ( 1 0 1 ) )
= 9 4 + 2 1 2 + 2 3 2 + . . . + 1 0 1 2
= 9 4 + ∑ x = 0 5 0 ( 2 x + 1 ) 2 − ∑ x = 0 9 ( 2 x + 1 ) 2
= 9 4 + 3 ( 5 1 ) ( 1 0 1 ) ( 1 0 3 ) − 3 ( 1 0 ) ( 1 9 ) ( 2 1 )
= 9 4 + 1 7 6 8 5 1 − 1 3 3 0 = 1 7 5 6 1 5
There is an error in your solution. There should be a '+' sign in the summation. i.e. 2x + 1
In chew-seong cheong's solution, sum of squares of first n odd natural numbers can be calculated as : Sum (odd) = Sum (n) - Sum (even)
1^2 + 3^2 + 5^2 + 7^2 + ... + (2n+1)^2 = 1^2 + 2^2 + 3^2 + 4^2...+ (n-1)^2 + n^2 - [2^2 + 4^2 + 6^2 + 8^2 + ... + (2k)^2] = (n)(n+1)(2n+1)/6 - 2^2*[ 1 + 2^2 + 3^2 + 4^2 + ... + k^2] {Since we need to find the sum till (n-1)^2, 2k=n-1, k=(n-1)/2} = (n)(n+1)(2n+1)/6 - 4[(n-1)(n)(n+1)/6] { putting k = (n-1)/2 } = n(n+1)(n+2)/6 {On simplification}
What I did was really rushy.
Take the alternating sum
( f ( 1 9 ) + f ( 2 0 ) ) − ( f ( 2 0 ) + f ( 2 1 ) ) + . . . − ( f ( 1 0 0 ) + f ( 1 0 1 ) ) = f ( 1 9 ) − f ( 1 0 1 )
2 0 2 − 2 1 2 + . . . + 1 0 0 2 − 1 0 1 2 = 9 4 − f ( 1 0 1 )
Solve for f ( 1 0 1 ) = 5 0 5 5
Take all the sum
f ( 1 9 ) + ∑ x = 2 0 1 0 1 ( f ( x ) + f ( x − 1 ) ) + f ( 1 0 1 ) = 9 4 + ∑ x = 2 0 1 0 1 x 2 + 5 0 5 5 = 3 5 1 2 3 0
Since all the f ( x ) from x = 1 9 to 1 0 1 are repeated twice, so we get 2 3 5 1 2 3 0 = 1 7 5 6 1 5
Why not pair f ( 2 0 ) with f ( 2 1 ) ,....., f ( 1 0 0 with f ( 1 0 1 and then finally add f ( 1 9 ) = 9 4 ?
Log in to reply
I was dum dum like freshly born tadpole. =w=
f is defined recursively.
I haven't taken the trouble to memoise the function for efficiency.
C-Code
#include<stdio.h>
int f(int x)
{
if(x==19)
return(94);
return (x*x-f(x-1));
}
int main()
{
int x,sum=0;
for(x=19;x<=101;x++)
sum+=f(x);
printf("%d",sum);
return 0;
}
f(x) can be x(x+1)/2 +96(-1)^x Hope You can do the sum!
Problem Loading...
Note Loading...
Set Loading...
Given expression = f ( 1 9 ) + ∑ x = 2 0 1 0 1 f ( x )
= f ( 1 9 ) + ∑ x = 1 0 5 0 [ f ( 2 x ) + f ( 2 x + 1 ) ]
= 9 4 + ∑ x = 1 0 5 0 ( 2 x + 1 ) 2
= 9 4 + ∑ x = 1 5 0 ( 2 x + 1 ) 2 − ∑ x = 1 9 ( 2 x + 1 ) 2
= 1 7 5 6 1 5