
% function to find a prime between n and 2n 

function out = find_prime(n)
   flag =0;
   out=n;
   while flag==0
     out=out+1;
     flag=isprime(out);
   end % while 
return 
