cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A123074 Number of ordered triples of primes (p,q,r) such that pqr = n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane and T. D. Noe, Sep 29 2006

Keywords

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

Crossrefs

Programs

  • 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 *)
  • 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

Extensions

More terms from T. D. Noe, Sep 29 2006