All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Sequence number compressed (Posted on 2020-10-28) Difficulty: 3 of 5
Let there be a sequence with a1=3/2 such that an+1=1+n/an. Find n such that 2020≤an<2021.

No Solution Yet Submitted by Danish Ahmed Khan    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 7
MATLAB code:

a=3/2; n=1;
while a<2020
    a=1+n/a;
    n=n+1;
    if n<20 || a>2019.998
        disp([n a])
    end
end
disp ([n a]);

finds

The first few

          n             a(n)
          
           2          1.66666666666667
           3                       2.2
           4          2.36363636363636
           5          2.69230769230769
           6          2.85714285714286
           7                       3.1
           8          3.25806451612903
           9          3.45544554455446
          10          3.60458452722063
          11          3.77424483306836
          12          3.91449031171019
          13          4.06553319703002
          14          4.19761255657606
          15          4.33522920739013
          16          4.46002466822976
          17          4.58742410416994
          18          4.70578337951076
          19          4.82508044853339
          
          . . .
          
and the leadup to the answer:          
          
     4078373          2019.99814307323
     4078374          2019.99839065948
     4078375           2019.9986382457
     4078376          2019.99888583189
     4078377          2019.99913341805
     4078378          2019.99938100417
     4078379          2019.99962859027
     4078380          2019.99987617634
     4078381          2020.00012376237
     
making the answer

 n   = 4078381     a(n)  =   2020.00012376237
 
UBASIC's

    10      a=3/2: n=1 
    20      while a<2020
    30          a=1+n/a
    40          n=n+1
    50      wend
    60      print n,a
    
corroborates the answer with slightly greater precision, 2020.0001237623724490723, but much longer time, for n   = 4078381.    


 


  Posted by Charlie on 2020-10-28 10:52:22
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information