[go: up one dir, main page]

login
Search: a123074 -id:a123074
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = 1 if n is a product of exactly 3 (not necessarily distinct) primes, otherwise 0.
+10
27
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0
OFFSET
1,1
FORMULA
a(n) = 1 if n has exactly three prime factors (not necessarily distinct), else a(n) = 0. a(n) = 1 if n is an element of A014612, else a(n) = 0.
a(n) = floor(Omega(n)/3) * floor(3/Omega(n)). - Wesley Ivan Hurt, Jan 10 2013
EXAMPLE
a(28) = 1 because 28 = 2 * 2 * 7 is the product of exactly 3 primes, counted with multiplicity.
MAPLE
A101605 := proc(n)
if numtheory[bigomega](n) = 3 then
1;
else
0;
end if;
end proc: # R. J. Mathar, Mar 13 2015
MATHEMATICA
Table[Boole[PrimeOmega[n] == 3], {n, 100}] (* Jean-François Alcover, Mar 23 2020 *)
PROG
(PARI) is(n)=bigomega(n)==3 \\ Charles R Greathouse IV, Apr 25 2016
CROSSREFS
Cf. A010051, A064911, (char funct. of) A014612, A101637, A123074.
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Dec 09 2004
EXTENSIONS
Description clarified by Antti Karttunen, Jul 23 2017
STATUS
approved
Number of ordered triples of primes (p,q,r) such that pqr = n-th 3-almost prime A014612(n).
+10
3
1, 3, 3, 3, 1, 3, 6, 6, 3, 3, 3, 3, 3, 6, 3, 6, 3, 3, 6, 3, 3, 3, 6, 6, 6, 6, 3, 3, 3, 1, 6, 6, 3, 3, 3, 6, 3, 6, 6, 3, 3, 6, 3, 6, 6, 3, 6, 6, 3, 3, 6, 6, 6, 3, 6, 3, 3, 3, 6, 6, 6, 3, 6, 3, 6, 3, 3, 6, 3, 6, 6, 6, 3, 6, 3, 6, 6, 3, 3, 3, 3, 1, 6, 6, 3, 6, 3, 6, 3, 6, 6, 6, 3, 3, 6, 6, 3, 6, 6, 3, 6, 3, 3, 6, 3
OFFSET
1,2
COMMENTS
The nonzero subsequence of A123074.
PROG
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot, primefactors
def A123073(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 f(x): return int(n+x-sum(primepi(x//(k*m))-b for a, k in enumerate(primerange(integer_nthroot(x, 3)[0]+1)) for b, m in enumerate(primerange(k, isqrt(x//k)+1), a)))
return (1, 3, 6)[len(primefactors(bisection(f, n, n)))-1] # Chai Wah Wu, Oct 20 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane and T. D. Noe, Sep 29 2006
EXTENSIONS
More terms from T. D. Noe, Sep 29 2006
STATUS
approved

Search completed in 0.008 seconds