OFFSET
1,1
LINKS
John Cerkan, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Range[3, 699, 2], OddQ[Total[Transpose[FactorInteger[#]][[2]]]] && !PrimeQ[#]&] (* Harvey P. Dale, Dec 09 2010 *)
Select[Range[3, 699, 2], CompositeQ[#]&&OddQ[PrimeOmega[#]]&] (* Harvey P. Dale, Jun 18 2024 *)
PROG
(Python)
from math import isqrt, prod
from sympy import primerange, integer_nthroot, primepi
from oeis_sequences.OEISsequences import bisection
def A046340(n):
def g(x, a, b, c, m): yield from (((d, ) for d in enumerate(primerange(b, isqrt(x//c)+1), a)) if m==2 else (((a2, b2), )+d for a2, b2 in enumerate(primerange(b, integer_nthroot(x//c, m)[0]+1), a) for d in g(x, a2, b2, c*b2, m-1)))
def f(x): return int(n+1+primepi(x)+sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x, 0, 1, 1, m)) for m in range(2, x.bit_length()+1, 2))+sum(sum(primepi((x>>1)//prod(c[1] for c in a))-a[-1][0] for a in g(x>>1, 0, 1, 1, m)) for m in range(2, x.bit_length(), 2)))
return bisection(f, n, n) # Chai Wah Wu, Dec 19 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Patrick De Geest, Jun 15 1998
EXTENSIONS
Name (description) modified by Harvey P. Dale, Dec 09 2010
STATUS
approved
