OFFSET
1,1
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
J. H. Conway, Heiko Dietrich and E. A. O'Brien, Counting groups: gnus, moas and other exotica, Math. Intell., Vol. 30, No. 2, Spring 2008.
Eric Weisstein's World of Mathematics, Almost Prime.
FORMULA
Product p_i^e_i with Sum e_i = 4.
a(n) ~ 6n log n / (log log n)^3. - Charles R Greathouse IV, May 04 2013
a(n) = A078840(4,n). - R. J. Mathar, Jan 30 2019
MATHEMATICA
Select[Range[200], Plus @@ Last /@ FactorInteger[ # ] == 4 &] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2008 *)
Select[Range[400], PrimeOmega[#] == 4&] (* Jean-François Alcover, Jan 17 2014 *)
PROG
(PARI) isA014613(n) = bigomega(n)==4 \\ Michael B. Porter, Dec 13 2009
(Python)
from sympy import factorint
def ok(n): return sum(factorint(n).values()) == 4
print([k for k in range(377) if ok(k)]) # Michael S. Branicky, Nov 19 2021
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def A014613(n):
def f(x): return int(n+x-sum(primepi(x//(k*m*r))-c for a, k in enumerate(primerange(integer_nthroot(x, 4)[0]+1)) for b, m in enumerate(primerange(k, integer_nthroot(x//k, 3)[0]+1), a) for c, r in enumerate(primerange(m, isqrt(x//(k*m))+1), b)))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m # Chai Wah Wu, Aug 17 2024
CROSSREFS
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), A014612 (r = 3), this sequence (r = 4), A014614 (r = 5), A046306 (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20). - Jason Kimberley, Oct 02 2011
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Patrick De Geest, Jun 15 1998
STATUS
approved