Skip to content

Instantly share code, notes, and snippets.

@Hermann-SW
Created June 19, 2023 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hermann-SW/eb39744899bf308365426ae64b0ff0c5 to your computer and use it in GitHub Desktop.
Save Hermann-SW/eb39744899bf308365426ae64b0ff0c5 to your computer and use it in GitHub Desktop.
shows difference for "list of largest 5000 primes"
#!/bin/bash
wget -O /tmp/all.txt https://t5k.org/primes/lists/all.txt 2> /dev/null
if [ ! -f t5k.org_primes_lists_all.txt ]
then
echo "initial download of largest primes list"
cp /tmp/all.txt t5k.org_primes_lists_all.txt
fi
if [ ! -f t5k.org_primes_lists_all.txt.old ]
then
cp t5k.org_primes_lists_all.txt t5k.org_primes_lists_all.txt.old
fi
diff t5k.org_primes_lists_all.txt /tmp/all.txt > /dev/null
if [ "$?" == "1" ]
then
echo "file downloaded is different"
mv t5k.org_primes_lists_all.txt t5k.org_primes_lists_all.txt.old
cp /tmp/all.txt t5k.org_primes_lists_all.txt
fi
diff <(cut -b7- t5k.org_primes_lists_all.txt.old) <(cut -b7- t5k.org_primes_lists_all.txt) --side-by-side -W 160 | egrep "(<|>|\|)"
@Hermann-SW
Copy link
Author

Hermann-SW commented Jun 19, 2023

List of 5000 largest primes:
https://t5k.org/primes/lists/all.txt

Sample script output:

$ ./latest_new_primes 
                 (Fri Jun 16 12:38:08 UTC 2023)				      |	                 (Mon Jun 19 05:38:13 UTC 2023)
									      >	 81*2^20498148+1                  6170560 L4965 2023 Generalized Fermat
									      >	 10^1234567-1927633367291*10^617277-1
									      >	                                  1234567 p423  2023 Palindrome
									      >	 168885632^131072+1               1078408 L5793 2023 Generalized Fermat
									      >	 2693*2^3473721+1                 1045698 L5174 2023 
									      >	 441*2^2449825-1                   737474 L5516 2023 
									      >	 276513748^65536+1                 553237 L4672 2023 Generalized Fermat
									      >	 276289408^65536+1                 553214 L5793 2023 Generalized Fermat
									      >	 275981748^65536+1                 553182 L5792 2023 Generalized Fermat
 236739740^65536+1                 548817 L5722 2023 Generalized Fermat	      <
 236552518^65536+1                 548794 L4904 2023 Generalized Fermat	      <
 236451326^65536+1                 548782 L5701 2023 Generalized Fermat	      <
 236393742^65536+1                 548775 L4201 2023 Generalized Fermat	      <
 236290432^65536+1                 548763 L4201 2023 Generalized Fermat	      <
 236083418^65536+1                 548738 L4201 2023 Generalized Fermat	      <
 236082486^65536+1                 548738 L5512 2023 Generalized Fermat	      <
 235956490^65536+1                 548722 L5459 2023 Generalized Fermat	      <
 235943220^65536+1                 548721 L4544 2023 Generalized Fermat	      <
 235558640^65536+1                 548674 L4387 2023 Generalized Fermat	      <
 10^220285-949*10^110141-1         220285 p363  2016 Palindrome		      <
									      >	Puada, GFNSvCUDA, GeneFer, AthGFNSieve, PrimeGrid, LLR
									      >	Wang5, GFNSvCUDA, GeneFer, AthGFNSieve, PrimeGrid, LLR
$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment