|Bill Allombert on Sun, 21 Feb 2016 19:54:18 +0100|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
On Sun, Feb 21, 2016 at 06:57:52PM +1100, Kevin Ryde wrote: > I tried a bit of code to find a linear recurrence or gf for given values. > I've had a few forms for quite a while but this is the first presentable > one :) > > http://user42.tuxfamily.org/pari-recurrence-guess/index.html > > Others have done the same, and the guts is a simple matsolve(), the only > difference here is some printing. I use it to see how something > complicated comes out, and if good then a gf or power expression to copy > into code or text. The look is slightly personal preference, but might > give another perspective. Instead of matsolve, ? recurrence_guess(v)=denominator(bestapprPade(Ser(v))); ? recurrence_guess([1, 3, 9, 25, 65, 161, 385, 897, 2049, 4609]) %7 = -4*x^3+8*x^2-5*x+1 Cheers, Bill.