cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A384545 Smallest prime(n)-smooth multiplier, m, such that both m*(prime(n)#)-1 and m*(prime(n)#)+1 are prime.

Original entry on oeis.org

2, 1, 1, 2, 1, 6, 8, 11, 4, 16, 22, 4, 74, 24, 37, 28, 14, 11, 242, 11, 91, 20, 83, 91, 35, 80, 48, 47, 1199, 2, 12, 203, 30, 38, 356, 54, 266, 108, 305, 255, 173, 1185, 738, 13, 382, 730, 455, 2156, 173, 1633, 2021, 1162, 164, 298, 69, 121, 702, 1670, 36, 570, 170, 204, 285, 908, 247
Offset: 1

Views

Author

Ken Clements, Jun 02 2025

Keywords

Comments

The multipliers produce the closest (by multiplication) twin prime average, at or above, the n-th primorial, without introducing new prime factors. That these numbers are so small in relation to the size of the primorials indicates a relationship to the twin prime number density in the neighborhood of the primorials. The "1" entries indicate that the 2nd, 3rd and 5th primorial numbers sit between twin primes.
The numbers a(n)*A002110(n) are in A384530, which is a subsequence of A014574.

Examples

			For n = 1, a(1) = 2 because the first primorial = 2 and 2*2 = 4, the average of primes 3 and 5.
For n = 2, a(2) = 1 because the second primorial = 6, the average of primes 5 and 7.
For n = 3, a(3) = 1 because the third primorial = 30, the average of primes 29 and 31.
For n = 8, a(8) = 11 because the eighth primorial = 9699690 and 11 times that is 106696590 which is the average of primes 106696589 and 106696591, and 11 has no prime factor greater than the greatest prime factor of the eighth primorial (which is 19), and no positive integer multiple less than 11 will result in a product that is bracketed by twin prime numbers.
		

Crossrefs

Programs

  • Python
    from sympy import primorial, prime, factorint
    from gmpy2 import is_prime
    def is_pr_smooth(n, r):
        return max(factorint(n).keys()) <= prime(r) if n > 1 else True
    def first_twin_bracketed_multiplier(r):
        prim_r = primorial(r)
        m = 1
        while True:
            if is_pr_smooth(m, r):
                n = prim_r * m
                if is_prime(n-1) and is_prime(n+1):
                    return m
            m += 1
    def aupto(terms):
        return [first_twin_bracketed_multiplier(r) for r in range(1, terms+1)]
    print(aupto(50))