OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
210 = 2*3*5*7 is a term.
130169 = 13*17*19*31 is a term.
PROG
(Python)
from sympy import factorint
def ok(n):
f = factorint(n)
return len(f) == sum(f.values()) == 4 and len(set([len(str(p)) for p in f])) == 1
print([k for k in range(144000) if ok(k)]) # Michael S. Branicky, Oct 08 2024
(Python)
from math import prod
from sympy import primerange
from itertools import count, combinations, islice
def bgen(d): # generator of terms that are products of d-digit primes
primes, out = list(primerange(10**(d-1), 10**d)), set()
for t in combinations(primes, 4): out.add(prod(t))
yield from sorted(out)
def agen(): # generator of terms
for d in count(1): yield from bgen(d)
print(list(islice(agen(), 34))) # Michael S. Branicky, Oct 08 2024
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
from oeis_sequences.OEISsequences import bisection
def A376864(n):
def f(x): return int(n+x+sum(max(c+1, primepi((y:=10**(len(str(k))-1))-1))-primepi(min(x//(k*m*r), 10*y-1)) for a, k in enumerate(primerange(integer_nthroot(x, 4)[0]+1)) for b, m in enumerate(primerange(k+1, min(10**(len(str(k)))-1, integer_nthroot(x//k, 3)[0]+1)), a+1) for c, r in enumerate(primerange(m+1, min(10**(len(str(k)))-1, isqrt(x//(k*m))+1)), b+1)))
return bisection(f, n, n) # Chai Wah Wu, Jun 04 2026
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paul Duckett, Oct 07 2024
EXTENSIONS
Terms corrected by Michael S. Branicky, Oct 08 2024
STATUS
approved
