This commit is contained in:
2025-06-10 11:54:50 +02:00
parent fe82635333
commit 7351838abb
14 changed files with 622 additions and 0 deletions

14
tp3/sophie-germain.sh Executable file
View 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