OFFSET
1,1
COMMENTS
Numbers that have a complete set of prime factors from 2 to their greatest prime factor (A055932) that are bracketed by twin primes (in A014574).
The density of twin prime numbers around terms appears to be enhanced, since the blocks of prime factors of a(n) "sweep" out possible low prime factors from a(n)-1 and a(n)+1.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms 1..3719 from Alois P. Heinz)
EXAMPLE
4 is a term since 4 = prime(1)# * 2 is in A055932 and 4-1 = 3 and 4+1 = 5 are both prime.
6 is a term since 6 = prime(2)# is in A055932 and 6-1 = 5 and 6+1 = 7 are both prime.
30 is a term since 30 = prime(3)# is in A055932 and 30-1 = 29 and 30+1 = 31 are both prime.
420 is a term since 420 = prime(4)# * 2 is in A055932 and 420-1 = 419 and 420+1 = 421 are both prime.
MAPLE
q:= n-> andmap(isprime, [n-1, n+1]) and (s-> nops(s)=
numtheory[pi](max(s)))({ifactors(n)[2][.., 1][]}):
select(q, [$1..40000])[]; # Alois P. Heinz, Jun 01 2025
PROG
(Python)
from sympy import factorint, prime, isprime
def is_pi_complete(n): # n is a term of A055932
if n <= 1:
return False
factors = factorint(n)
primes = list(factors.keys())
max_prime, r = max(primes), len(primes)
return max_prime == prime(r)
def is_twin_prime_bracketed(n): # n is a term of A014574
return isprime(n-1) and isprime(n+1)
def aupto(limit):
return [n for n in range(4, limit+1, 2) if is_twin_prime_bracketed(n) and is_pi_complete(n)]
print(aupto(40_000))
(Python)
from itertools import islice
from heapq import heappop, heappush
from sympy import isprime, nextprime
def A384530_gen(): # generator of terms
h, hset = [(1, (1, ))], {1}
while True:
m, ps = heappop(h)
if m>3 and isprime(m-1) and isprime(m+1):
yield m
for p in ps:
mp = m*p
if mp not in hset:
heappush(h, (mp, ps))
hset.add(mp)
q = nextprime(max(ps, default=1))
mp = m*q
if mp not in hset:
heappush(h, (mp, (ps+(q, ))))
hset.add(mp)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ken Clements, Jun 01 2025
STATUS
approved
