tp3
This commit is contained in:
14
tp3/sophie-germain.sh
Executable file
14
tp3/sophie-germain.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
min=4611686018427387904
|
||||
max=$((min + 20000))
|
||||
PRIMESIEVE="/export/documents/info/is1+2/asr/primesieve"
|
||||
|
||||
$PRIMESIEVE $min -n 20000 > primes.txt
|
||||
|
||||
while read q; do
|
||||
echo "chargement"
|
||||
p=$((2*q + 1))
|
||||
if $PRIMESIEVE $p -n 1 | grep -q "^$p$"; then
|
||||
echo "$p"
|
||||
fi
|
||||
done < primes.txt
|
Reference in New Issue
Block a user