Prime number calculation

Here is an algorithm for working out whether a number is primehttp://lifeisalist.wordpress.com/2009/09/26/p29-determine-whether-a-given-integer-number-is-prime/The author gives the following examplewhere isPrime each til 1001 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 8997What would be the syntax for using the above function if I wish tofind the first prime number above 1 million?

q){$[isPrime x;:x;.z.s x+1]} 1000000
1000003

Simple recursive function that test if an integer is prime, otherwise
adds 1 to that integer an calls itself again.