This site is supported by donations to The OEIS Foundation.

# Jacobsthal function

### From OeisWiki

The ordinary **Jacobsthal function** *j*(*n*) is defined as the smallest positive integer *m*, such that every
sequence of *m* consecutive integers contains an integer coprime to *n*. The definition refers to all integers, not just those in the range .

A048669 Jacobsthal function: maximal gap in a list of all the integers relatively prime to *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

Jacobsthal conjectured that

## Jacobsthal function of primorial numbers

The **Jacobsthal function** of primorial numbers *h*(*n*) is defined as the smallest positive integer *m*, such that every
sequence of *m* consecutive integers contains an integer coprime to the product of the first *n* primes. The definition refers to all integers, not just those in the range .

where is the *n*th primorial number (the product of the first *n* primes).

A048670 Jacobsthal function A048669 applied to the product of the first *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, ...}

## External links

- Basic C-version of Jacobsthal calculation, GitHub—Social Coding.
- THOMAS R. HAGEDORN, COMPUTATION OF JACOBSTHAL'S FUNCTION h(n) FOR n < 50.