TOPICS
Search

Jacobsthal Function


The Jacobsthal function j(n) of a positive integer n is the least positive integer m such that every block of m consecutive integers contains an integer relatively prime to n (Costello and Watts 2015). For example, j(6)=4 because four consecutive integers always include one relatively prime to 6, while 2, 3, and 4 form a block of three that does not. The first values, starting at n=1, are 1, 2, 2, 2, 2, 4, 2, 2, 2, 4, ... (OEIS A048669).

Let omega(n) be the prime nu function, and let h(k) be the maximum of j(n) over positive integers n with omega(n)<=k. Requiring exactly k distinct prime factors gives the same maximum, since adding prime factors cannot decrease j(n). For k=1, 2, ..., the values of h(k) begin 2, 4, 6, 10, 14, 22, ... (OEIS A395279).

Iwaniec (1978) proved h(k)=O(k^2(lnk)^2) as k->infty. OpenAI (2026) established the bound

 h(k)<=(Ck^2)/((lnln(3k))^2)

for every integer k>=1, with an absolute constant C>0. The formal proof of this bound and of the quadratic bound in Erdős Problem 970 was independently checked (White 2026).

Weeks (2026) reports the explicit upper bounds h(k)<=2k^3 and h(k)<=9.24k^(201/100)(ln(k+2))^(151/100) for every integer k>=1. The cubic bound is attained at k=1, since j(n)=2 for every prime power n. The proof combines finite certificates with explicit linear sieve estimates. The Hexagon record discloses AI-generated technical derivations and reports computer checks of the finite certificates and numerical constants. The companion Lean formalization covers core sieve inputs.

For real z>=2, let P(z) be the product of the primes p<=z. Choose one residue class modulo each such p, and let Y(z) be the greatest y for which some choice covers all integers from 1 through y. The Chinese remainder theorem identifies any such choice with a translate of the classes of multiples of the prime factors of P(z), so Y(z)=j(P(z))-1. If p_k is the kth prime number, the values of Y(p_k) are 1, 3, 5, 9, 13, 21, ... (OEIS A058989). The associated values of j(P(p_k)) are 2, 4, 6, 10, 14, 22, ... (OEIS A048670). The first difference between this sequence and h(k) occurs at k=24, where j(P(p_(24)))=234 and h(24)=236 (Hajdu and Saradha 2012).

Writing pi(z) for the prime counting function gives Y(z)<h(pi(z)). The bound for h(k) and the prime number theorem then give

 Y(z)=O((z^2)/((lnz)^2(lnlnz)^2)).

Here O denotes big-O notation. In particular, Y(z)=o(z^2), where o denotes little-O notation. This establishes the weaker bound requested in Erdős Problem 687.


See also

Prime Nu Function, Relatively Prime

Explore with Wolfram|Alpha

References

Costello, F. and Watts, P. "An Upper Bound on Jacobsthal's Function." Math. Comput. 84, 1389-1399, 2015. https://doi.org/10.1090/S0025-5718-2014-02896-2.Hajdu, L. and Saradha, N. "Disproof of a Conjecture of Jacobsthal." Math. Comput. 81, 2461-2471, 2012. https://doi.org/10.1090/S0025-5718-2012-02581-6.Iwaniec, H. "On the Problem of Jacobsthal." Demonstratio Math. 11, 225-232, 1978. https://doi.org/10.1515/dema-1978-0121.OpenAI. "A Quadratic Bound for Jacobsthal's Function." Sep. 25, 2026. https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/preprints/A-quadratic-bound-for-Jacobsthals-function-September-25-2026/paper.pdf.Weeks, A. "Explicit Polynomial Bounds for Jacobsthal's Function." 30 Nov 2026. https://hexagonmath.org/2611.01459v1.White, P. "Jacobsthal's Function: OpenAI's Bound Refereed, Erdős #970." Erdős Problem a Day. Oct. 23, 2026. https://www.erdosproblemaday.com/day/970-openai-jacobsthal-quadratic-refereed.Sloane, N. J. A. Sequences A048669, A048670, A058989, and A395279 in "The On-Line Encyclopedia of Integer Sequences."

Cite this as:

Weisstein, Eric W. "Jacobsthal Function." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/JacobsthalFunction.html

Subject classifications