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.

This page as a plain text file.
%I A384545 #17 Jun 12 2025 08:31:59
%S A384545 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,
%T A384545 80,48,47,1199,2,12,203,30,38,356,54,266,108,305,255,173,1185,738,13,
%U A384545 382,730,455,2156,173,1633,2021,1162,164,298,69,121,702,1670,36,570,170,204,285,908,247
%N A384545 Smallest prime(n)-smooth multiplier, m, such that both m*(prime(n)#)-1 and m*(prime(n)#)+1 are prime.
%C A384545 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.
%C A384545 The numbers a(n)*A002110(n) are in A384530, which is a subsequence of A014574.
%H A384545 Ken Clements, <a href="/A384545/b384545.txt">Table of n, a(n) for n = 1..1000</a>
%H A384545 Ken Clements, <a href="/A384545/a384545.py.txt">Values Checking Program</a>
%e A384545 For n = 1, a(1) = 2 because the first primorial = 2 and 2*2 = 4, the average of primes 3 and 5.
%e A384545 For n = 2, a(2) = 1 because the second primorial = 6, the average of primes 5 and 7.
%e A384545 For n = 3, a(3) = 1 because the third primorial = 30, the average of primes 29 and 31.
%e A384545 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.
%o A384545 (Python)
%o A384545 from sympy import primorial, prime, factorint
%o A384545 from gmpy2 import is_prime
%o A384545 def is_pr_smooth(n, r):
%o A384545     return max(factorint(n).keys()) <= prime(r) if n > 1 else True
%o A384545 def first_twin_bracketed_multiplier(r):
%o A384545     prim_r = primorial(r)
%o A384545     m = 1
%o A384545     while True:
%o A384545         if is_pr_smooth(m, r):
%o A384545             n = prim_r * m
%o A384545             if is_prime(n-1) and is_prime(n+1):
%o A384545                 return m
%o A384545         m += 1
%o A384545 def aupto(terms):
%o A384545     return [first_twin_bracketed_multiplier(r) for r in range(1, terms+1)]
%o A384545 print(aupto(50))
%Y A384545 Cf. A002110, A014574, A088257, A384530.
%K A384545 nonn
%O A384545 1,1
%A A384545 _Ken Clements_, Jun 02 2025