Skip to content

Instantly share code, notes, and snippets.

@Hermann-SW
Created January 16, 2026 16:54
Show Gist options
  • Select an option

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

Select an option

Save Hermann-SW/14c7c7c6acd1f69f8dc36e51af1fdb3a to your computer and use it in GitHub Desktop.
Compute number of primes of form x^2 + x + A for x <= 10^11 (for Jacobson and Williams A = 3399714628553118047)
export(A=3399714628553118047); a(n)=parsum(k=0, 10^n, isprime(k^2+k+A));
default(threadsizemax,1000*10^6); \\ default 8MB was too small
#
print(a(11));
@Hermann-SW
Copy link
Author

Hermann-SW commented Jan 17, 2026

Michael J. Jacobson, Jr.,
Computational techniques in quadratic fields,
Master’s thesis, University of Manitoba, Winnipeg, Manitoba, 1995.

Michael J. Jacobson Jr. and Hugh C. Williams,
New Quadratic Polynomials With High Densities Of Prime Values,
Math. Comp., 72, 241, 499-519, 2002.

Number of primes of the form x^2 + x + A for x <= 10^n, with A=3399714628553118047 from Jacobson:

 n        a(n)
-- -----------
 0           1
 1           5
 2          24
 3         235
 4        2482
 5       25034
 6      251841
 7     2517022
 8    25153819
 9   251014697
10  2408242218
11 22066543923

a(11) is 1.61412× bigger than a(11) for A=41 (Euler polynomial primes),
and 5.35848× bigger than number of "normal" primes up to 10¹¹.

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