This site is supported by donations to The OEIS Foundation.

# Jacobsthal function

The ordinary Jacobsthal function ${\displaystyle j(n)}$ is defined as the smallest positive integer ${\displaystyle m}$, such that every sequence of ${\displaystyle m}$ consecutive integers contains an integer coprime to ${\displaystyle n}$. The definition refers to all integers, not just those in the range ${\displaystyle \scriptstyle [1,\,n-1]\,}$.

A048669 Jacobsthal function: maximal gap in a list of all the integers relatively prime to ${\displaystyle n}$.

{1, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 4, 2, 4, 3, 2, 2, 4, 2, 4, 3, 4, 2, 4, 2, 4, 2, 4, 2, 6, 2, 2, 3, 4, 3, 4, 2, 4, 3, 4, 2, 6, 2, 4, 3, 4, 2, 4, 2, 4, 3, 4, 2, 4, 3, 4, 3, 4, 2, 6, 2, 4, 3, 2, 3, 6, 2, 4, 3, 6, 2, 4, 2, 4, 3, 4, 3, ...}

## Asymptotic behavior

Iwaniec proved that

${\displaystyle j(n)=O(\log ^{2}(n)).\,}$

Jacobsthal conjectured that

${\displaystyle j(n)=O\left(\left({\frac {\log n}{\log \log n}}\right)^{2}\right).\,}$

## Jacobsthal function of primorial numbers

The Jacobsthal function of primorial numbers ${\displaystyle h(n)}$ is defined as the smallest positive integer ${\displaystyle m}$, such that every sequence of ${\displaystyle m}$ consecutive integers contains an integer coprime to the product of the first ${\displaystyle n}$ primes. The definition refers to all integers, not just those in the range ${\displaystyle \scriptstyle [1,\,n-1]\,}$.

${\displaystyle h(n):=j\left((p_{n})\#\right)=j\left(\prod _{i=1}^{n}p_{i}\right),\,}$

where ${\displaystyle \scriptstyle (p_{n})\#\,}$ is the ${\displaystyle n}$th primorial number (the product of the first ${\displaystyle n}$ primes).

A048670 Jacobsthal function A048669 applied to the product of the first ${\displaystyle n}$ primes (A002110).

{2, 4, 6, 10, 14, 22, 26, 34, 40, 46, 58, 66, 74, 90, 100, 106, 118, 132, 152, 174, 190, 200, 216, 234, 258, 264, 282, 300, 312, 330, 354, 378, 388, 414, 432, 450, 476, 492, 510, ...}