i <- 42
primeCount <- 0
while(primeCount < 42)
{
  if(gmp::isprime(i) == 2)
  {
    primeCount <- primeCount + 1
    extraCredit <- format(i, big.mark=",", scientific = FALSE)
    cat("Prime count:", paste0(primeCount, ";"), "The prime just found was:", extraCredit, "\n")
    i <- i + i
  }
  i <- i + 1
}