Meanwhile, I found one answer myself.
https://fricas.github.io/api/RecurrenceOperator
ROZE==>RecurrenceOperator(Integer, Expression Integer)
getEq(res)$ROZE
I do not like this abbreviated name. That goes against the usual rule of
having fully expanded names. We have ==> to abbreviate.
Other question...
aList(n)==[n*factorial(n+2*k-1)/(factorial(n + k)*factorial(k))*(-1)^k_
for k in 0..14];
g := guessPRec(aList 1)
[[f(n): (n+2)*f(n+1)+(4*n+2)*f(n)=0, f(0)=1]]
rec := getEq(first g)$ROZE
(n+2)*f(n+1)+(4*n+2)*f(n)=0
Such a recurrence cries for turning it into a program that can compute
the elements of the sequence.
Of course, it doesn't work to simply define
fexpr := subst(f(n+1)-rec/(n+2),n=n-1)
f(0) == 1
f(n) == fexpr
because then f(1) would return exactly the expression involving n.
also
f(k) == subst(fexpr, n=k)
doesn't work, since it does not trigger recursion.
(1) Is it actually possible to turn an expression into a program?
(2) How do I transform rec to an expression of the form
f(n) = ... f(n-1) + ... f(n-2)
but NOT doing by hand.
(3) Can I extract the initial values from the result of guessPRec?
Thank you
Ralf