login
A105561
a(n) is the m-th prime, where m is the number of distinct prime factors of n (A001221), a(1) = 1.
2
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,2
COMMENTS
Term a(1) = 1 prepended to match with the definition of A105560. - Antti Karttunen, May 25 2017
LINKS
EXAMPLE
Let n = 6; 6 has 2 different prime factors, therefore a(6) = 3, the second prime.
MATHEMATICA
Table[Prime[Length[FactorInteger[n]]], {n, 2, 84}]
Prime[PrimeNu[Range[2, 90]]] (* Harvey P. Dale, Oct 02 2013 *)
PROG
(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
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, May 03 2005
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
STATUS
approved