Question: What is wrong with my program?

Hello everyone!

Prime:= proc (a, b)

local i, p, r;

p := ();

r :=() ;

for i from a to b do

   if isprime(i) then p := p union (i) end if;

     if type(sqrt(p[i]-1), integer) then r := r union (p[i]) end if;

end do

end proc;

Prime(1, 10)

My English is not very good. I don't know what erros I get in my program. Thank everyone

Please Wait...