Question: What is wrong with code?

Hello everyone! My English is not very good. 

I have writtien Lucas sequence program:

F := proc (n::nonnegint)

option remember;

if n < 2 then n else F(n-1)+F(n-2) 

end if;

end proc;

L := proc (n::nonnegint)

if n = 0 then return 2 end if;

if n = 1 then return 1 end if;

if n <> 0 and n <> 1 then return

L(n-1)+L(n-2) end if; end proc;

S:=proc(n::nonnegint)

 local i;  

for i from 1 by 1 to n do   S(i)=L(i)^(2)-5*F(i)^(2);

 print("%a",S(i));  end proc: 

 

And Maple notice :error

I don't know call procedure inside another procedure. 
Thank you so much

Regards

sunflower

Please Wait...