Given list of numbers from 1 to 100, select the prime numbers.
Mathematica
Remove["Global`*"] lst = Range[1, 100]; Select[lst, PrimeQ]
{2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97}
Maple
restart; lst:=[seq(i,i=1..100)]; result:=select[flatten](isprime,lst); #or. using Array instead of list lst:=Array(0..99,x->x+1): #generate numbers from 1 to 100 select[flatten](isprime,lst);
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]