define and := (basic)



hi,

why the result of g(2),g(3),g(4) is 3^n,3^n,3^n ?

.........
load(solve_rec);
rec:f(n)=3*f(n-1);
s:solve_rec(rec,f(n),f(1)=3);
g(n):= rhs(s);
g(2);g(3);g(4);

-->3^n,3^n,3^n
i know that define(g(n),rhs(s)) works

........

f(x):= x^2;
i(y):= rhs(last( solve(f(x)=y,x)));
i(2);i(3);i(4);

Here works!
........
 thanks.