login
A386252
Numbers m of the form 2^i * 3^j * 5^k such that i, j, k > 0 and m+1 and m-1 are both prime numbers.
5
30, 60, 150, 180, 240, 270, 600, 810, 1620, 3000, 4050, 4800, 9000, 9720, 15360, 21600, 23040, 33750, 138240, 180000, 281250, 345600, 737280, 3456000, 6144000, 6561000, 10125000, 13668750, 15552000, 17496000, 20995200, 22118400, 24000000, 30000000, 54675000
OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..6085 (terms 1..926 from Ken Clements)
EXAMPLE
a(1) = 2^1 * 3^1 * 5^1 = 30 where 29 and 31 are prime numbers.
a(2) = 2^2 * 3^1 * 5^1 = 60 where 59 and 61 are prime numbers.
a(3) = 2^1 * 3^1 * 5^2 = 150 where 149 and 151 are prime numbers.
a(4) = 2^2 * 3^2 * 5^1 = 180 where 179 and 181 are prime numbers.
MATHEMATICA
seq[max_] := Select[Table[2^i*3^j*5^k, {i, 1, Log2[max]}, {j, 1, Log[3, max/2^i]}, {k, 1, Log[5, max/(2^i*3^j)]}] // Flatten // Sort, And @@ PrimeQ[# + {-1, 1}] &]; seq[10^8] (* Amiram Eldar, Jul 17 2025 *)
PROG
(Python)
from math import log10
from gmpy2 import is_prime
l2, l3, l5 = log10(2), log10(3), log10(5)
upto_digits = 20
sum_limit = 3 + int((upto_digits - l3 - l5)/l2)
def TP_pi_3_upto_sum(limit): # Search all partitions up to the given exponent sum.
unsorted_result = []
for exponent_sum in range(3, limit+1):
for i in range(1, exponent_sum -1):
for j in range(1, exponent_sum - i):
k = exponent_sum - i - j
log_N = i*l2 + j*l3 + k*l5
if log_N <= upto_digits:
N = 2**i * 3**j * 5**k
if is_prime(N-1) and is_prime(N+1):
unsorted_result.append((N, log_N))
sorted_result = sorted(unsorted_result, key=lambda x: x[1])
return sorted_result
print([n for n, _ in TP_pi_3_upto_sum(sum_limit) ])
(Python)
from itertools import islice
from heapq import heappop, heappush
from sympy import isprime
def A386252_gen(): # generator of terms
h, hset = [30], {30}
while True:
m = heappop(h)
if isprime(m-1) and isprime(m+1):
yield m
for p in (2, 3, 5):
mp = m*p
if mp not in hset:
heappush(h, mp)
hset.add(mp)
A386252_list = list(islice(A386252_gen(), 45)) # Chai Wah Wu, Apr 21 2026
CROSSREFS
Subsequence of A143207.
Sequence in context: A359410 A108454 A235483 * A387673 A064783 A228877
KEYWORD
nonn
AUTHOR
Ken Clements, Jul 16 2025
STATUS
approved