login

Revision History for A069275

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
14-almost primes (generalization of semiprimes).
(history; published version)
#31 by Michael De Vlieger at Mon Nov 04 09:30:14 EST 2024
STATUS

reviewed

approved

#30 by Joerg Arndt at Mon Nov 04 01:49:02 EST 2024
STATUS

proposed

reviewed

#29 by Chai Wah Wu at Sun Nov 03 12:28:38 EST 2024
STATUS

editing

proposed

#28 by Chai Wah Wu at Sun Nov 03 12:28:34 EST 2024
PROG

from math import isqrt, prod

STATUS

proposed

editing

#27 by Robert C. Lyons at Sun Nov 03 11:23:51 EST 2024
STATUS

editing

proposed

#26 by Robert C. Lyons at Sun Nov 03 11:23:34 EST 2024
PROG

(PARI) k=14; start=2^k; finish=240000; v=[] ; for(n=start, finish, if(bigomega(n)==k, v=concat(v, n))); v

STATUS

proposed

editing

#25 by Chai Wah Wu at Sun Nov 03 11:12:13 EST 2024
STATUS

editing

proposed

#24 by Chai Wah Wu at Sun Nov 03 11:12:08 EST 2024
PROG

return bisection(f, n, n) # Chai Wah Wu, Nov 03 2024

#23 by Chai Wah Wu at Sun Nov 03 11:11:49 EST 2024
PROG

(Python)

from math import isqrt

from sympy import primerange, integer_nthroot, primepi

def A069275(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

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+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x, 0, 1, 1, 14)))

return bisection(f, n, n) # Chai Wah Wu, Nov 03 2024

STATUS

approved

editing

#22 by Bruno Berselli at Sat Nov 01 18:27:24 EDT 2014
STATUS

reviewed

approved