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.

A105561 a(n) is the m-th prime, where m is the number of distinct prime factors of n (A001221), a(1) = 1.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 2, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 2, 5, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 5, 2, 3, 3, 2, 3, 5, 2, 3, 3, 5, 2, 3, 2, 3, 3, 3, 3, 5, 2, 3, 2, 3, 2, 5, 3, 3, 3, 3, 2, 5, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 2, 5, 2, 3, 5, 3, 2, 3, 2, 5, 3, 3, 2, 5, 3, 3, 3, 3, 3, 5
Offset: 1

Views

Author

Cino Hilliard, May 03 2005

Keywords

Comments

Term a(1) = 1 prepended to match with the definition of A105560. - Antti Karttunen, May 25 2017

Examples

			Let n = 6; 6 has 2 different prime factors, therefore a(6) = 3, the second prime.
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[Length[FactorInteger[n]]], {n, 2, 84}]
    Prime[PrimeNu[Range[2,90]]] (* Harvey P. Dale, Oct 02 2013 *)
  • PARI
    A105561(n) = if(1==n,n,prime(omega(n))); \\ [After the original Pari-program given here.] - Antti Karttunen, May 25 2017
    
  • Python
    from sympy import prime, primefactors
    def a(n): return 1 if n==1 else prime(len(primefactors(n))) # Indranil Ghosh, May 25 2017

Extensions

Edited by Stefan Steinerberger, Jun 15 2007
Term a(1) = 1 prepended (correcting also the indexing of the rest of terms), and data section extended to 120 terms by Antti Karttunen, May 25 2017