This site is supported by donations to The OEIS Foundation.

User talk:Charles R Greathouse IV/Pari

From OeisWiki
Jump to: navigation, search

Charles, I just noticed that "recurrences" section of yours. I think there is a much more efficient approach using the qflll() function, as in my following ggf() (guess generating function) the denominator of which can readily be "transformed" into a recurrence relation (as you know of course):

ggf(v)={my(p,q,B=#v\2);if(B<4,return("Need at least 8 values!"));
if(!#q=qflll(matrix(B,B,x,y,v[x-y+B+1]),4)[1],return("QFLLL returned empty result."));
if(polcoeff(p=Ser(q[,1]),0)<0,p=-p);q=Pol(Ser(v)*p);
if(Ser(v)==q/=Pol(p),q,Str("I guessed "q", but it doesn't reproduce the last value!"))}

Hope that might be useful! MFH 13:24, 31 August 2014 (UTC)