#C5.txt: Feb. 4, 2016 Help:=proc(): print(`F(n), SF(N),T(N) , ST(N), GP1(L,n,d), GP(L,n) `): end: #F(n): the Fibonacci nunber F(n) F:=proc(n) option remember: if n=0 or n=1 then n: else F(n-1)+F(n-2): fi: end: #SF(N): the sequence of first N Fibonacci numbers starting at n=1 SF:=proc(N) local n: [seq(F(n),n=1..N)]: end: #T(n): the Tribonacci nunber F(n) T:=proc(n) option remember: if n=1 or n=2 or n=3 then 1: else T(n-1)+T(n-2)+T(n-3): fi: end: #ST(N): the sequence of first N Fibonacci numbers starting at n=1 ST:=proc(N) local n: [seq(T(n),n=1..N)]: end: #GP1(L,n,d): inputs a sequence of rational numbers, a symbol n, and a non-neg. #integer d, outputs a polynomial p(n) such that p(i)=L[i] for all i from 1 to nops(L) GP1:=proc(L,n,d) local i,a,p,var, var1, eq: if nops(L)FAIL then RETURN(p): fi: od: FAIL: end: