TCS
Company
In a sequence of integers, A(n)=A(n-1)-A(n-2),where A(n) is the nth term in the sequence, n is an integer and n>=3, A(1)=1,A(2)=1. Calculate S(1000), where S(1000) is the sum of first 1000 terms.
Read Solution (Total 8)
-
- sorry i took A(1)=-1,bt given A(1)=1
dat was wrong
check it now
A(1)=1,A(2)=1.
A(3)=A(2)-A(1) acc to the given formula A(n)=A(n-1)-A(n-2)
A(3)=1-1=0.
similarliy,A(4)=A(3)-A(2)=0-1=-1.
A(5)=A(4)-A(3)=-1-0=-1.
A(6)=A(5)-A(4)=-1-(-1)=0.
after 6th term seq is repeating like...1,1,0,-1,-1,0...after every 6 terms
so the sum of these 6 terms are 1+1+0+(-1)+(-1)+0=0.
now we have to find sum of 1000 terms...
sum of first 600 terms is 0...(as consider 1,1,0,-1,-1,0 as one sequence,now consider 166 seq i.e 166*6=996 terms)
so the sum of first 996 terms is 0...after that 4 terms come i.e 1,1,0,-1
so the sum of last 4 terms = 1+1+0+(-1)=1. - 12 years agoHelpfull: Yes(43) No(0)
- a[1]=1
a[2]=1
a[3]=a[2]-a[1]=1-1=0
subsequently series
1,1,0,-1,-1,0,1,1,0,-1,-1,0...
1000/6=166.66
166*6=996
1000-996=4
1+1+0+(-1)=1(from series)
answer=1 - 12 years agoHelpfull: Yes(10) No(0)
- A(1)= -1
A(2)= 1
A(3)= 2
A(4)=A(3)-A(2)= 1
A(5)=A(4)-A(3)= -1
A(6)=A(5)-A(4)= -2
A(7)=A(6)-A(5)= -1 =A(1)
A(8)=A(7)-A(6)= 1 =A(2)
So,next terms can easily be predicted from the previous steps.
A(9)=A(3)=2
A(10)=A(4)= 1
A(11)=A(5)= -1
A(12)=A(6)= -2
A(13)=A(7)=A(1)=-1
A(14)=A(8)=A(2)=1
the sum of 1st 6 terms = A(1)+A(2)+A(3)+A(4)+A(5)+A(6)=-1+1+2+1-1-2=0
Now, 1000 = 6*166 + 4
So, S(1000) = 166*0 +{A(1)+A(2)+A(3)+A(4)} = 0+ {-1+1+2+1} = 3
dats y i think 3 will b d correct ans - 12 years agoHelpfull: Yes(3) No(4)
- @mrudula yup i knw an z nt der...dis z a tcs openseesame ques...n dis the correct method...in dat dey r showing ans z 3..i dnt knw hw 3 ll cum,if u knw den tel us
- 12 years agoHelpfull: Yes(2) No(0)
- ans will b 3
- 12 years agoHelpfull: Yes(1) No(5)
- the correct answer to this question is 3 as per the open seesame test but i dnt knw hw they got this answer.
- 12 years agoHelpfull: Yes(0) No(1)
- plz send me tcs new pattern questionson on egra.subha@gmail.com
- 12 years agoHelpfull: Yes(0) No(0)
- hai sanjana one is not der in the options pls check and post the correct one
- 12 years agoHelpfull: Yes(0) No(0)
TCS Other Question