Let a n be a sequence of positive real numbers defined by a 1 = 1 and
a n + 1 = a n + a n 1 for n ≥ 1 .
Evaluate ⌊ a 1 0 0 0 0 0 ⌋ .
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.
Excuse me, you forgot the square for the first a 1 0 0 0 0 0 . It should be a 1 0 0 0 0 0 2 .
Nice. Using a i 2 provides a much easier bound. This can also be approached using a n + 1 − a n = a n 1 , but the bounding will need to be done more tightly / recursively.
Can you justify replacing the a j − 2 with the 2 j − 1 in the upper bound inequality?
Log in to reply
In the line above, I have shown that a n 2 ≥ 2 n .
Wow, it's amazing that you could get it to 2 decimal places, without using a computer.
really wonderful and smart solution !!! thanx for uploading !! :)
Log in to reply
tui bujhli kichu eta.tui tahole ek matro indian je bujhte pereche.
Log in to reply
HAA HAA :D VAI BUJHINI BISHES KICHHU :P Dekhte valo laglo bole prosonsha korlam r ki !!!
Disclaimer: This solution is NOT rigorous. Note: When I refer to terms, I am referring to the floor of them, since our desired number is the floor of a certain term.
So whenever I see a problem like this, my favorite approach is always to start with small cases and list out several of the first terms. So here's a list of the FLOOR of the first 30 terms, starting with a 1 : 1 , 2 , 2 , 2 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 4 , 5 , 5 , 5 , 5 , 5 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 7 , 7 , 7 , 7 , 7 , 7
Now, you may wonder where I get this from, but trust me, it is easier to see when you've written the term number next to each term in the list: The terms increase by 1 at the midpoints of consecutive triangular numbers. Specifically, if we have two consecutive triangular numbers a , b , an increase will occur at the ⌈ 2 a + b ⌉ th term (where ⌈ n ⌉ denotes the smallest m ≥ n ). At this point I can't exactly prove this, but we can check our list of terms: a 2 = 2 , 2 = ⌈ 2 3 + 1 ⌉ a 5 = 3 , 5 = ⌈ 2 3 + 6 ⌉ a 8 = 4 , 8 = ⌈ 2 6 + 1 0 ⌉ a 1 3 = 5 , 1 3 = ⌈ 2 1 0 + 1 5 ⌉ a 1 8 = 6 , 1 8 = ⌈ 2 1 5 + 2 1 ⌉ All of them satisfy our conjecture. Also, note that each of the terms above are the FIRST terms that equal their respective amount (i.e. a 1 8 is the FIRST term that is equal to 6 .
Now, all we have to do is find a triangular number, which is in the form 2 n ( n + 1 ) , near 1 0 0 0 0 0 . 2 n ( n + 1 ) = 1 0 0 0 0 0 ⟹ n 2 + n − 2 0 0 0 0 0 = 0 ⟹ n ≈ 4 4 6 . 7 Since 4 4 7 . 5 > 4 4 6 . 7 > 4 4 6 . 5 , we are past the midpoint of the two triangular numbers nearest 1 0 0 0 0 0 , so our answer is 4 4 7 by the aforementioned conjecture.
That's an interesting observation. It makes sense that the jumps would be at the midpoints of consecutive triangular numbers since a n ≈ 2 n and 2 1 [ 2 n ( n + 1 ) + 2 ( n + 1 ) ( n + 2 ) ] = 2 ( n + 1 ) 2 .
Sorry, when defining the ceiling function, I meant to say "the smallest m ≥ n , m ∈ Z ." Or in other words ⌈ n ⌉ denotes the smallest integer greater than n .
We can create a function y whose Euler's method approximation is a n . Shifting the indices down 1 , we have a 0 = 1 and we wish to find ⌊ a 9 9 9 9 9 ⌋ . Using a step size of 9 9 9 9 9 1 , a 9 9 9 9 9 will approximate y ( 1 ) . We have y ( 9 9 9 9 9 n + 1 ) ≈ y ( 9 9 9 9 9 n ) + 9 9 9 9 9 1 y ′ ( 9 9 9 9 9 n ) . Letting y ′ = y 9 9 9 9 9 will give us y ( 9 9 9 9 9 n + 1 ) ≈ y ( 9 9 9 9 9 n ) + 9 9 9 9 9 1 ⋅ y ( 9 9 9 9 9 n ) 9 9 9 9 9 . This will make a n a good approximation to y ( 9 9 9 9 9 n ) . Solving this differential equation gives y = 1 9 9 9 9 8 x + C and using y ( 0 ) = 1 yields y = 1 9 9 9 9 8 x + 1 . Finally, plugging in 1 for x , a 9 9 9 9 9 ≈ 1 9 9 9 9 9 and ⌊ 1 9 9 9 9 9 ⌋ = 4 4 7 .
and I thought Euler's method was useless when I learned it in calculus :P
Nice solution! But how can we be sure that your delta is small enough so that errors do not accumulate? Maybe the errors are such that the actual floor is 446 or 448 or something? For instance there are some functions for which linearization gives increasingly bad approximations the further you go out.
Log in to reply
That's true; I did not claim my solution was rigorous. Unfortunately, I do not know any error bounds for Euler's method.
Note that a 2 = 2 and a n + 1 2 = a n 2 + a n 2 1 + 2 .
Now we have a 1 0 0 0 0 0 2 = [ i = 2 ∑ 9 9 9 9 9 a i + 1 2 − a i 2 ] + a 2 2
= [ i = 2 ∑ 9 9 9 9 9 a i 2 1 + 2 ] + 1 = i = 2 ∑ 9 9 9 9 9 a i 2 1 + 2 0 0 0 0 0
To create a telescoping series, we note that i = 2 ∑ 9 9 9 9 9 a i × a i + 1 1 < i = 2 ∑ 9 9 9 9 9 a i 2 1 < i = 2 ∑ 9 9 9 9 9 a i × a i − 1 1
→ 0 < a 2 1 − a 1 0 0 0 0 0 1 < i = 2 ∑ 9 9 9 9 9 a i × a i − 1 1 < a 1 1 − a 9 9 9 9 9 1 < 1
Hence 2 0 0 0 0 0 < a 1 0 0 0 0 0 2 < 2 0 0 0 0 1 or ⌊ a 1 0 0 0 0 0 ⌋ = 4 4 7 .
Motivation: first I noticed that the question asks for an estimate of a 1 0 0 0 0 0 , not an exact value, so I wanted to make a number appear in the equation. Squaring the RHS of the equation creates 2, which is what I wanted. Then I guess that the method of differences must appear somewhere as it is the easiest way to create the term a 1 0 0 0 0 0 . I then realized that I can do this telescoping trick with the sequence ( a i 2 1 ) in order to get a pretty accurate estimate. That's how I figured out the solution.
A bit of thinking is needed here. You state that a i 2 1 < a i a i − 1 1 which is fine. However, you then proceed to compare ∑ a i a i − 1 1 with ∑ ( a i − 1 − 1 − a i − 1 ) in order to telescope your series, and this is not obvious, since a i − 1 1 − a i 1 = a i a i − 1 a i − a i − 1 = a i a i − 1 2 1 Indeed, the second sum is smaller than the first.
Log in to reply
Thank you for your comment, I will fix my solution after class today.
The last part is wrong as Mark pointed out, so I've thought about a quick fix:
Note that ( i = 2 ∑ 9 9 9 9 9 a i a i − 1 1 ) 2 < 9 9 9 9 8 i = 2 ∑ 9 9 9 9 9 a i 2 a i − 1 2 1 (by Cauchy-Schwarz)
< 9 9 9 9 8 i = 2 ∑ 9 9 9 9 9 a i a i − 1 2 1 = 9 9 9 9 8 i = 2 ∑ 9 9 9 9 9 a i − 1 1 − a i 1
= 9 9 9 9 8 ( 1 − a 9 9 9 9 9 1 ) < 9 9 9 9 8
Hence 2 0 0 0 0 0 < a 1 0 0 0 0 0 2 < 2 0 0 0 0 0 + 9 9 9 9 8 < 2 0 0 3 1 7 , which is a pretty rough estimate, but still gives the floor value as 447.
an+1 ^2 =an^2+1/an^2 +2 an= a1+1/a1+1/a2+….1/an-1 an^2=a1^2+1/a2^2+…..1/an-1^2 +2*n
a100001^2 =a1 ^2+1/a1^2…..1/a100000^2 +200000=(a1 +1/a1 +1/a2+……1/a100000)^2 =>a1 ^2+1/a1^2…..1/a100000^2 +200000= a1^ 2+1/a1^2…..1/a100000^2 +2(a1/a2+a1/a3……….1/a99999a100000) =>100000 = a1(a1+1/a1+1/a2+….1/a100000 –a1) + 1/a1(a1+1/a1+1/a2+….1/a100000 –a1-1/a1)..........a100000(a1+1/a1+1/a2+….1/a100000 - a1-1/a1-1/a2-….1/a100000) a1(a100000-a1) +1/a1(a100000-a1) + 1/a2(a100000 –a2)........1/a100000(a100000-a100000) =>100000=a100000(a100001) -100000 =>200000 = a100000(a100000+1/a100000) =>200000 = a100000^2 +1 =>[√199999] =447
Not a strict one. If we can estimate the upper bound as a ( n ) ≤ f ( n ) , we can accordingly estimate the lower bound as 1 + ∑ k = 1 n − 1 f ( k ) 1 . So a tight bound (or the order of divergence) satisfies
f ( n ) ∼ 1 + k = 1 ∑ n − 1 f ( k ) 1 ≈ k = 1 ∑ n − 1 f ( k ) 1 ≈ ∫ 0 x f ( t ) d t
If you remember ( x ) ′ = 2 x 1 , f ( n ) = 2 n will be a reasonable guess. So just try 446 or 447, given that 2 0 0 0 0 0 ≈ 4 4 6 . 8 9 1
You may want to try 447 first because the l.h.s. is "larger".
We can use this easy C++ code ---
void main()
{ clrscr();
long int sum,n=1;
float p=1, q =1,a=0;
while(n<=100000)
{ a=p+q;
p=a;
q= 1/a;
n++;
}
sum=a;
cout<<"\n\n\tSum: "<<sum;
getch();
return;
}
Output: Sum: 447 (Ans)
For the math sections, stay away from using methods like this. According to FAQ, the math problems are designed to be solved with paper and pencil. While using code is not cheating, it says
if you find yourself wanting to brute force an answer with a computer, there is probably a more elegant way to go about it you are not seeing
which is indeed the case for this problem. I could probably solve this problem using the sequence function on my TI-84, but I didn't because there's no fun in that IMO, and I don't gain anything intellectually.
This kind of answers should not be given...
Log in to reply
It is just the use of technology that we can use.
Log in to reply
There are many competition sites for "technology". Like CodeForces , TopCoder , or SPOJ , all of which are my favorites. I'll suggest to do the right thing at the right place.
Log in to reply
@Ziyuan Lin – Thanks, for suggestions I'll surely look up these sites.
Log in to reply
@Shubham Kumar – Or Project Euler if you don't want to handle the input format.
This is cheating. :|
Log in to reply
Can you please explain why is this cheating?
Log in to reply
There is a reason why you should not use a motorcycle in a bicycle race :)
Seriously, let's remember that the goal is the journey itself, and, as Michael Tong pointed out, one gains nothing intellectually by this kind of brute-forcing.
Log in to reply
@Alexander Borisov – I agree that journey is more important compared to the destination. But still, use of code also needs some application of logic. No one loses. If you really want the intuitive solution, we can discuss that too. Different flavours, Yo !! Good job, Shubham..
Log in to reply
@Tushar Sharma – Certainly. The discussion that I'd rather have, is that since the calculations are not exact, how do you know that within the limits of error, you have arrived at the correct answer using this code?
See for example the Patriot Missile Failure , in which "Because of the way the Patriot computer performs its calculations and the fact that its registers are only 24 bits long, the conversion of time from an integer to a real number cannot be any more precise than 24 bits. This conversion results in a loss of precision causing a less accurate time calculation. The effect of this inaccuracy on the range gate's calculation is directly proportional to the target's velocity and the length of the the system has been running. Consequently, performing the conversion after the Patriot has been running continuously for extended periods causes the range gate to shift away from the center of the target, making it less likely that the target, in this case a Scud, will be successfully intercepted."
Log in to reply
@Calvin Lin – Absolutely. Any computer technique working with reals, and any approximation method, is only as accurate as its error bounds. Suppose that the approximation method, or computer technique, had yielded 4 4 7 . 0 0 0 0 0 0 0 1 as the answer. Would we be justified in saying that the integer part was 4 4 7 , or could errors in calculation or the approximation model give an answer of 4 4 6 ? We got lucky in this problem that the actual value of a 1 0 0 0 0 0 was about 4 4 7 . 2 , so that a reasonably good approximation gave the right integer part.
This is not a criticism of computer methods. Actually, if a computer solution was coupled with an analysis that the answer was sure to be accurate enough, I would cheer. The problem is with computer solutions or with iterative techniques which have not been analysed for precision.
Log in to reply
@Mark Hennings – Indeed, an accurate error analysis, including the estimates for the round-off errors, is a standard part of virtually all applied math papers.
In pure math, the computers can also be very useful, especially when handling vast case-by-case analysis. In fact, I would much rather trust a computer to do that rather than a human. A great example of such use is this paper by Kreuzer and Skarke. You don't need to know anything about the actual question (classification of some particular 4-dimensional polyhedra) to appreciate the discussion of the results on page 10.
@Mark Hennings – As you can see in the computer code that computer first calculates the value of the sum as a 'float' value which is 'a' = 447.220154, then it is changed into 'integer' by changing its declaration type by equating it with 'integer' value which is 'sum' giving greatest integer value as 447.
Log in to reply
@Shubham Kumar – But there is your problem, and possibly your solution. To calculate a 1 0 0 0 0 0 , you need to perform 2 0 0 0 0 0 calculations (you need to take each a n , invert it and add it to itself to get the next a n + 1 ).
If you have chosen to work with a real variable type that calculates real numbers to 9 significant figures, then you must anticipate the possibility that each calculation creates an error in the 9 th significant figure. It might not, but it may well. You also have to allow for the possibility that these errors accumulate, rather than cancel each other out. At least, in this case, we do not have to worry about small errors becoming large. This can happen when dividing by a number close to zero, for example; we are always dividing by numbers greater than 1 . Given the answer to the question, most of the time we will be dealing with values of a n greater than 1 0 0 , and so we can decide that each calculation might create an error of 0 . 0 0 0 0 0 1 .
A total of 2 0 0 0 0 0 calculation errors of size 0 . 0 0 0 0 0 1 brings about a possible error of up to about 0 . 2 in your final answer. At this point you might feel able to say that the answer is really 4 4 7 , since your float value of 4 4 7 . 2 2 0 1 5 4 could refer to an actual answer somewhere between 4 4 7 . 0 2 and 4 4 7 . 4 2 . Any number in this range has 4 4 7 as integer part.
If you could be certain that your data type had 9 significant figure accuracy, you would be confident of being OK. However, I think that the float data type only guarantees 7 significant figures, in which case the above analysis would give the possibility of an error in calculation too great to permit you to trust your answer. You would be safer with a double data type, which is 64 bit.
Log in to reply
@Mark Hennings – Thanks for the precise knowledge....
@Tushar Sharma – Thanks Tushar Bhai, for your support. How can we discuss the intuitive solutions?
nice one man even i had thought about it the same
Well, here's a python algorithm...
Answer = 1
for x in range (1, 100000):
Answer += 1.00 / Answer
print int(Answer)
Output: 447
Simple and shorter... ;)
To solve using pen and paper: based on numerical evidence, I observed that (a_n) is approximately (2n+0.25)^(1/2). Thus, if this claim is true, we just need to plug in n=10^5 to solve the problem. However this is merely a conjecture. I would be grateful if anyone could prove or disprove my claim?
So here's the thing! Now as someone who really likes his short-cuts, I decided to use the programming method to solve the question. Programming really shortens the time taken to solve the problem. The following is the very short lines of code that I used to solve the problem. The code is in Java and I use the NetBeans IDE!
double[] brilliant_series = new double[100000];
brilliant_series[0] = 1;
for(int i = 1 ; i < brilliant_series.length ; i++)
{
brilliant_series[i] = brilliant_series[i-1] + (1/brilliant_series[i-1]);
}
System.out.println(brilliant_series[99999]);
And the output-- 447.21972185666755 As we're asked for the greatest integer lesser than or equal to the above, the answer is 447!
Cheers!
but how do you solve it using paper and pen??
Log in to reply
To solve using pen and paper: based on numerical evidence, I observed that (a_n) is approximately (2n+0.25)^(1/2). Thus, if this claim is true, we just need to plug in n=10^5 to solve the problem. However this is merely a conjecture. I would be grateful if anyone could prove or disprove my claim?
Log in to reply
According to my method the value of a{n} can be found by solving the following: 2n+1=(a{n})^2 - ln(a{n}). You are correct in stating that a{n} belongs to O(n^1/2)
how to solve this qtn??
I too couldn't find another method for solving this
Log in to reply
A(n+1) = A(n) + 1/ A(n)......A(n+1) - A(n)= 1/ A(n)
(1)SUM(99999){ A(n+1) - A(n) } = (1)SUM(99999){ 1/ A(n) }, Left hand is telescopic series.
A(100000) - A(1) = (1)SUM(99999){ 1/ A(n) }
We desire A(100000) = (1)SUM(99999){ 1/ A(n) } + 1........A(1) = 1...........................
I get 6 < (1)SUM(1000){ 1/ A(n) } < 8
Thus A(100000) = 7.,,,,,,,
Can help me see my mistake ??????
Problem Loading...
Note Loading...
Set Loading...
Since a n + 1 = a n + a n − 1 for n ≥ 1 , we see that a n + 1 2 − a n 2 = 2 + a n − 2 for all n ≥ 1 , so that a n 2 − 1 = a n 2 − a 1 2 = j = 1 ∑ n − 1 ( 2 + a j − 2 ) for all n ≥ 2 , and hence a n 2 = 2 n − 1 + j = 1 ∑ n − 1 a j − 2 ≥ 2 n for all n ≥ 2 . Thus we deduce that 2 n ≤ a n 2 ≤ 2 n − 1 + 2 1 + j = 1 ∑ n − 1 ( 2 j ) − 1 = 2 n − 2 1 + 2 1 j = 1 ∑ n − 1 j − 1 for all n ≥ 2 . Using the standard inequality that j = 1 ∑ n j − 1 ≤ ln n + 1 n ≥ 1 , we deduce that 2 n ≤ a n 2 ≤ 2 n − 2 1 + 2 1 ( ln ( n − 1 ) + 1 ) = 2 n + 2 1 ln ( n − 1 ) for all n ≥ 2 . This implies that 2 0 0 0 0 0 ≤ a 1 0 0 0 0 0 2 ≤ 2 0 0 0 0 0 + 2 1 ln 9 9 9 9 9 = 2 0 0 0 0 5 . 7 6 and hence 4 4 7 . 2 1 ≤ a 1 0 0 0 0 0 ≤ 4 4 7 . 2 2 so that ⌊ a 1 0 0 0 0 0 ⌋ = 4 4 7 .
It is clear from the recurrence relation that the sequence diverges. While a n may diverge to infinity slowly, a n 2 will diverge to infinity more rapidly, and therefore we might hope to obtain a bound on the size of ∑ j a j − 2 . This turned out to be the case.