VOOZH about

URL: https://oeis.org/A382785

⇱ A382785 - OEIS


login
A382785
a(n) is the least multiple of the n-th primorial such that both a(n)-1 and a(n)+1 are prime and the prime factors of a(n) do not exceed prime(n).
1
4, 6, 30, 420, 2310, 180180, 4084080, 106696590, 892371480, 103515091680, 4412330782860, 29682952539240, 22514519501013540, 313986271960080720, 22750921955774182170, 912496437361321252440, 26918644902158976946980, 1290172194953476680815970, 1901713815361424627522739780
OFFSET
1,1
COMMENTS
a(n) is the smallest multiple k of the n-th primorial, prime(n)#, such that both k-1 and k+1 are prime and the prime factors of m = k/prime(n)# do not exceed prime(n).
From Michael S. Branicky, Apr 19 2025: (Start)
a(n) first differs from A060255(n) + 1 at n = 29.
a(349) has 1001 digits. (End)
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..348
EXAMPLE
For a(2), (2*3)*1 = 6 and the first twin primes are 5, 7.
For a(3), (2*3*5)*1 = 30 and the first twin primes are 29, 31.
For a(4), (2*3*5*7)*2 = 420, the first twin primes are 419, 421 and 2 <= prime(4).
For a(5), (2*3*5*7*11)*1 = 2310 and the first twin primes are 3209, 3211.
For a(6), (2*3*5*7*11*13)*2*3 = 180180. the first twin primes are 180179, 180181 and 2, 3 <= prime(6).
MATHEMATICA
a[n_] := Module[{P, k}, P=Product[Prime[i], {i, 1, n}]; k = 1; While[!(PrimeQ[k*P-1] && PrimeQ[k*P+1]), k++]; k*P] (* James C. McMahon, May 09 2025 *)
PROG
(Python)
from itertools import count
from sympy import factorint, isprime, prime, primorial
def a(n):
pn, prn = prime(n), primorial(n)
return next(k for m in count(1) if max(factorint(m), default=1)<=pn and isprime((k:=m*prn)-1) and isprime(k+1))
print([a(n) for n in range(1, 20)]) # Michael S. Branicky, Apr 18 2025
(PARI) isok(k, p) = if (k>1, vecmax(factor(k)[, 1])<=p, 1);
a(n) = my(P=vecprod(primes(n)), k=1, p=prime(n)); while(!(isok(k, p) && ispseudoprime(k*P-1) && ispseudoprime(k*P+1)), k++); k*P; \\ Michel Marcus, Apr 27 2025
CROSSREFS
Supersequence of A088256.
Sequence in context: A209298 A075590 A088255 * A192083 A068720 A068402
KEYWORD
nonn
AUTHOR
Rory Pulvino, Apr 04 2025
EXTENSIONS
Data corrected by Michael S. Branicky, Apr 18 2025
STATUS
approved