#Homework by Ben Miles for Experimental math assigned 2/6 OK to post GuessRec1:=proc(L,r) local c,i,var,eq: if nops(L)<=2*r+6 then RETURN(FAIL): fi: var:={seq(c[i],i=1..r)}: eq:={seq( L[n]+add(c[i]*L[n-i],i=1..r)=0 , n=r+1..nops(L))}: var:=solve(eq,var): if var=NULL then RETURN(FAIL): fi: [[seq(subs(var, c[i]),i=1..r)], L[1..r] ] ; end: GuessRec:=proc(L) local r,ans: for r from 1 to (nops(L)-6)/2 do ans:=GuessRec1(L,r): if ans<>FAIL then RETURN(ans): fi: od: FAIL: end: #RecToSeq(C,n) inputs a C-finite sequence and a pos. integer n, and outputs the list of the first n terms of the sequence RecToSeq:=proc(C,n) local l,k,G,i: option remember: l:=nops(C[2]): k:=nops(C[1]): G:=C[2]: if l