login
A123074
Number of ordered triples of primes (p,q,r) such that pqr = n.
3
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 1, 3, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 3, 3, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 6, 0, 3, 0, 6, 0, 0, 0, 0, 3, 3, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3, 0, 0, 6, 0, 0, 6
OFFSET
1,12
COMMENTS
For distinct primes p, q and r, a(p^3) = 1, a(p^2 q) = 3, a(pqr) = 6, otherwise (when A101605(n) = 0), a(n) = 0. - Comment clarified by David A. Corneth and Antti Karttunen, Jul 23 2017
MATHEMATICA
Join[{0}, Table[e=Sort[Transpose[FactorInteger[n]][[2]]]; Which[e=={3}, 1, e=={1, 2}, 3, e=={1, 1, 1}, 6, True, 0], {n, 2, 150}]] (* T. D. Noe, Sep 29 2006 *)
PROG
(PARI) A123074(n) = if(3==bigomega(n), binomial(1+omega(n), 2), 0); \\ Antti Karttunen, Jul 23 2017
(Python)
from sympy import factorint
def A123074(n): return (1, 3, 6)[len(f)-1] if sum(f:=factorint(n).values())==3 else 0 # 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