Skip to content

Instantly share code, notes, and snippets.

@Hermann-SW
Created January 15, 2026 07:21
Show Gist options
  • Select an option

  • Save Hermann-SW/61f86acd5a93b0acdf205dfd2f0b2f7a to your computer and use it in GitHub Desktop.

Select an option

Save Hermann-SW/61f86acd5a93b0acdf205dfd2f0b2f7a to your computer and use it in GitHub Desktop.
Script to compute a(11) for oeis sequence A331876 (Euler polynomial)
a(n)=parsum(k=0, 10^n, isprime(k^2 + k + 41));
default(threadsizemax,1000*10^6); \\ default 8MB was too small
#
print(a(11));
@Hermann-SW
Copy link
Author

Hermann-SW commented Jan 15, 2026

After verification of a(10) in 35min real time on 192C/384T Lenovo x3950-X6 8-socket server with Intel Xeon 8890v4 CPUs, started with:

nohup numactl -C 0-191 gp -q < a11.A331876.gp 
hermann@x3950-X6:~$ cat nohup.out
   timer = 1 (on)
13670943964
cpu time = 3010h, 52min, 13,510 ms, real time = 15h, 41min, 6,047 ms.
hermann@x3950-X6:~$

So a(11)=13670943964 for A331876 was computed in15:42h real time, and 125.45 days total time.

@Hermann-SW
Copy link
Author

Hermann-SW commented Jan 18, 2026

After verification of a(10) in 35min real time on 192C/384T Lenovo x3950-X6 8-socket server with Intel Xeon 8890v4 CPUs, ...

Same computation with 16C/32T server with AMD 7950X CPU (5.5× slower):

hermann@7950x:~$ numactl -C 0-15 gp -q < a11.A331876.gp 
   timer = 1 (on)
1510676803
cpu time = 51h, 26min, 20,891 ms, real time = 3h, 12min, 57,685 ms.
hermann@7950x:~$ 

Same computation with 28C/56T 2-socket server with Intel Xeon E5-2680v4 CPUs (7× slower — 14/11=1.2727× slower than 7950X):

hermann@E5-2680v4:~$ numactl -C 0-27 gp -q < a11.A331876.gp 
   timer = 1 (on)
1510676803
cpu time = 114h, 51min, 26,176 ms, real time = 4h, 6min, 10,573 ms.
hermann@E5-2680v4:~$ 

Both servers together are roughly1/3rd of x3950-X6 (1/5.5+1/7=0.325) compute power.

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