OFFSET
1,1
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.
LINKS
Ken Clements, Table of n, a(n) for n = 1..1000
Ken Clements, Values Checking Program
EXAMPLE
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.
PROG
(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))
(Python)
from math import prod
from heapq import heappop, heappush
from sympy import prime, isprime
def A384545(n):
h, hset, ps = [1], {1}, tuple(prime(i) for i in range(1, n+1))
q = prod(ps)
while True:
m = heappop(h)
if isprime(m*q-1) and isprime(m*q+1):
return m
for p in ps:
mp = m*p
if mp not in hset:
heappush(h, mp)
hset.add(mp) # Chai Wah Wu, Apr 04 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Ken Clements, Jun 02 2025
STATUS
approved
