TCS
Company
In a sequence of integers, A(n)=A(n-1)-A(n-2), where A(n) is the n th 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 the first 1000 terms.
Read Solution (Total 10)
-
- A(3)=A(2)-A(1)=1-1=0
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
A(7)=A(6)-A(5)=0+1=1
A(8)=A(7)-A(6)=1-0=1
A(9)=A(8)-A(7)=1-1=0
A(10)=A(9)-A(8)=0-1=-1
for suppose if we add first ten terms we get result as 1 i.e 1+1+0-1-1+0+1+1+0-1=1
hence S(1000)=1
- 11 years agoHelpfull: Yes(43) No(2)
- ans is 1.
a(1)=1
a(2)=1
a(3)=0
a(4)=-1
a(5)=-1
a(6)=0
{1,1,0,-1,-1,0}repeats for 166 times i.e upto 996th term and it's sum equal to zero.now the sum of last four terms(1,1,0,-1)=1.
sum(1000 terms)=1.
- 11 years agoHelpfull: Yes(18) No(1)
- A(1)=1,A(2)=1,A(3)=1-1=0,A(4)=0-1=-1,A(5)=-1-0=-1,A(6)=-1-(-1)=0,A(7)=0-(-1)=1,A(8)=1-0=1,A(9)=1-1=0
hence we can see that term multiple of 3 becomes 0....
now,
S(from n=3 to 1000)=A(3)+A(4)+A(5)+.......+A(999)+A(1000)
=A(2)-A(1)+A(3)-A(2)+A(4)-A(3)+.......+A(998)-A(997)+A(999)-A(998)
=A(999)-A(1)=-1(SINCE A(999)=0)
hence,s(from n=1 to 1000)=A(1)+A(2)+S(from n=3 TO 1000)=1+1-1=1(ans) - 11 years agoHelpfull: Yes(4) No(0)
- 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.
- 11 years agoHelpfull: Yes(3) No(1)
- A1=1
A2=1
A3=A1-A2=0
A4=-1
A5=-1
A6=0
A7=1
A8=1
.
.
A999=-1
A1000=-1
S1000=1+1-A1+A999=2-1-1=0 - 11 years agoHelpfull: Yes(2) No(0)
- @debs agatle kada :P :P
- 11 years agoHelpfull: Yes(2) No(1)
- s(1000)=a[1]+a[2]+a[3]+a[4]....+a[1000]
=1+1+0-1-1++0+1+1+0-1 10 terms
- 11 years agoHelpfull: Yes(1) No(1)
- A(3)=0
A(4)=0-1=-1
A(5)=-1-0=-1
A(6)=0
A(7)=0--1=1
A(8)=0--1=1
A(9)=1-1=0
A(10)=0-1=-1
S(1000)=0 - 11 years agoHelpfull: Yes(1) No(2)
- ans is 1 .
a(1000)=a(1000-1)-a(1000-2)
a(1000)=1 - 11 years agoHelpfull: Yes(0) No(2)
- ANS IS 2;
TERMS ARE 1,2,0,-1,-1,0,1,1,0,-1,-1,0,1,1,-1,-1.........
SUM OF FIRST TWO TERMS IS 3;
SUM OF NEXT 6 TERM IS 0;
AFTER ELEMINATING FIRST TWO TERMS THERE ARE 98 REMAINING TERMS OUT OF WHICH 96 TERM GIVE 0 SUM AND LAST TWO GIVE-1(0,-1 terms) so sum is 3-1=2 - 11 years agoHelpfull: Yes(0) No(0)
TCS Other Question