OFFSET
1,1
COMMENTS
Previous name: a(n) is the k-th prime number, where k is the greatest prime number dividing n, a(1) = 2.
If n is in standard form, that is, n = p_1^n_1 * p_2^n_2 * ... * p_k^n_k where p_1, p_2, ..., p_k are primes with p_1 < p_2 <...< p_k and n_1 > 0, n_2 > 0, ..., n_k > 0 then a(n) = prime(p_k) = A000040(p_k). - Muniru A Asiru, Nov 26 2018
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..10000
EXAMPLE
From Muniru A Asiru, Nov 26 2018: (Start)
For n = 6, the greatest prime number dividing 6 is 3. Hence, a(6) = prime(3) = 5.
For n = 7, the greatest prime number dividing 7 is 7. Therefore, a(7) = prime(7) = 17.
For n = 666 = 2*3^2*37, the greatest prime number dividing 666 is 37. Hence, a(666) = prime(37) = 157. (End)
MAPLE
a:= n-> ithprime(max(1, seq(i[1], i=ifactors(n)[2]))):
seq(a(n), n=1..80); # Alois P. Heinz, Nov 28 2018
MATHEMATICA
Prime[FactorInteger[#][[-1, 1]]] & /@ Range[2, 75] (* Harvey P. Dale, Apr 11 2011 *)
PROG
(PARI) a(n) = if (n==1, 2, prime(vecmax(factor(n)[, 1]))); \\ Michel Marcus, Nov 26 2018
(GAP) P:=Filtered([1..300], IsPrime);; a:=List(List([1..65], n->Reversed(Factors(n))), i->P[i[1]]); # Muniru A Asiru, Nov 26 2018
CROSSREFS
KEYWORD
easy,nonn,less
AUTHOR
Cino Hilliard, May 03 2005
EXTENSIONS
a(1)=2 prepended by Muniru A Asiru, Nov 26 2018
New name from Michel Marcus, Dec 09 2018
STATUS
approved