function L = all_primes(n)
if n == 2 L = [2]; 
else
    L = 2:n;
    L = L(isprime(L));
end;

