OFFSET
1,1
COMMENTS
a(n) is the n-th product of n distinct primes.
All terms are even.
This sequence differs from A073329 which has also nonsquarefree terms.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..350
FORMULA
EXAMPLE
PROG
(Python)
from math import isqrt, prod
from sympy import primerange, integer_nthroot, primepi
def A340467(n):
if n == 1: return 2
def g(x, a, b, c, m): yield from (((d, ) for d in enumerate(primerange(b+1, isqrt(x//c)+1), a+1)) if m==2 else (((a2, b2), )+d for a2, b2 in enumerate(primerange(b+1, integer_nthroot(x//c, m)[0]+1), a+1) for d in g(x, a2, b2, c*b2, m-1)))
def f(x): return int(n+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x, 0, 1, 1, n)))
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
return bisection(f) # Chai Wah Wu, Aug 31 2024
CROSSREFS
Main diagonal of A340316.
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jan 08 2021
STATUS
approved