2

I tried to use the characteristic equation technique which basically led me to (n-2) roots. what I did was put $a_n$ as $x^n$ and same for n-1. Taking $x^{(n-2)}$ led me to a higher degree polynomial. Then I resorted to python. I wrote a script so I could obtain the first n values for all integral inputs. The source code follows:

Python version 3

depth=input("enter depth : ")
depth=int(depth)
listis=[None]*depth
listis[0]=1

def f(n,listis): if n == 1: return 1 else: listis[n-1]=listis[n-2]+1/listis[n-2] return listis[n-2]+1/listis[n-2]

import time for i in range(depth): tt=time.time()

print ("The value of f(",i+1,") is ",f(i+1,listis))

print ("computed in ", time.time()-tt ," seconds")

print (f(i+1,listis))

#print (listis[depth-1])

You can check the following graph as well https://www.desmos.com/calculator/mtepe4pdsg I found out that it increases always and the first decimal places showcases a pattern which is very much visible when the units digit is 9.

Pattern is as follows:

9.031846164717614
9.142565499586983
9.25194398859482
9.36002938137635
9.466866652847923
9.572498224166102
9.676964161540262
9.780302355555111
9.882548683290779
9.983737155217133

I have tried numpy polyfit as well and it doesnt seem to fit. The coefficients for degree(1 upto degree 10 are as follows):

[0.11199654 3.9178784 ]
[-7.92924950e-04  1.92081958e-01  2.55642626e+00]
[ 1.24263633e-05 -2.67551898e-03  2.68517761e-01  1.89714183e+00]
[-2.60256961e-07  6.49982694e-05 -6.10038906e-03  3.46286630e-01
  1.48684664e+00]
[ 6.40214942e-09 -1.87679969e-06  2.10497785e-04 -1.16532133e-02
  4.28025960e-01  1.19246775e+00]
[-1.74582869e-10  5.93007587e-08 -7.96069525e-06  5.40080166e-04
 -2.00822463e-02  5.15765103e-01  9.60398854e-01]
[ 5.10638718e-12 -1.97969074e-09  3.12182211e-07 -2.57784984e-05
  1.20066428e-03 -3.23214527e-02  6.11265933e-01  7.64857997e-01]
[-1.56810140e-13  6.84576839e-11 -1.24466422e-08  1.22180547e-06
 -7.02796874e-05  2.41588122e-03 -4.95017346e-02  7.16107540e-01
  5.91920008e-01]
[ 4.98123182e-15 -2.42078000e-12  4.99472539e-10 -5.70348627e-08
  3.94084176e-06 -1.69434350e-04  4.50932324e-03 -7.29491182e-02
  8.31706919e-01  4.33414958e-01]
[-1.61948602e-16  8.67652759e-14 -2.00502065e-11  2.61608664e-09
 -2.11920169e-07  1.10445757e-05 -3.71712108e-04  7.92828968e-03
 -1.04170633e-01  9.59323448e-01  2.84241128e-01]

Here the last terms are constant terms and as we go on left, the power increases.

To summarize : I was not able to approximate the solution without a computational aid. I would like a more intuitive way to approximate it.

#Without any computational aid

$a_{246}$=22.236857105192666

Closed form for the sequence defined by $a_0=1$ and $a_{n+1} = a_n + a_n^{-1}$

1 Answers1

3

$a_n$ is increasing and suppose that $k\lt a_n\lt k+1$ then $a_n+\frac 1{k+1} \lt a_{n+1} \lt a_n+\frac 1k$ so there is a fair estimate to be made that there are either $k$ or $k+1$ elements with integer part $k$. Refining this should get you pretty close to a good-enough estimate.

Mark Bennet
  • 100,194