OFFSET
1,1
COMMENTS
LINKS
Rick L. Shepherd, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 510510 = 2*3*5*7*11*13*17 = A002110(7).
MATHEMATICA
f7Q[n_]:=Last/@FactorInteger[n]=={1, 1, 1, 1, 1, 1, 1}; lst={}; Do[If[f7Q[n], AppendTo[lst, n]], {n, 9!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 26 2008 *)
Select[Range[1600000], PrimeNu[#]==7&&SquareFreeQ[#]&] (* Harvey P. Dale, Sep 19 2013 *)
PROG
(PARI) is(n)=omega(n)==7 && bigomega(n)==7 \\ Hugo Pfoertner, Dec 18 2018
(Python)
from math import isqrt, prod
from sympy import primerange, integer_nthroot, primepi
def A123321(n):
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, 7)))
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
KEYWORD
nonn
AUTHOR
Rick L. Shepherd, Sep 25 2006
EXTENSIONS
More terms from Vladimir Joseph Stephan Orlovsky, Aug 26 2008
STATUS
approved