x <- matrix(1:10, nrow=10, ncol=10, byrow=TRUE)
x * IsPrime(x)
# Find first prime number octett:
octett <- c(0, 2, 6, 8, 30, 32, 36, 38) - 19
while (TRUE) {
octett <- octett + 210
if (all(IsPrime(octett))) {
cat(octett, "\n", sep=" ")
break
}
}
Run the code above in your browser using DataLab