Ох, да, конечно, позабыл:
for n from 1 to 1000 do if isprime(n) = true and isprime(n+2) = true
Спасибо, огромное smile.gif