Doesn't this seem a tiny bit odd?

Script (calling YAFU wip r395):

Code:

#!/bin/bash
np=2
while [ $np -lt 30 ]
do
printf "nextprime for $np is "
np=$(./yafu "nextprime($np)" -silent)
echo "$np"
done

Result:

Code:

$ bash primesgen.sh
nextprime for 2 is 3
**nextprime for 3 is 13**
nextprime for 13 is 17
nextprime for 17 is 19
nextprime for 19 is 23
nextprime for 23 is 29
nextprime for 29 is 31

Not that anyone would generate primes in this fashion.