OFFSET
1,4
COMMENTS
For n>1, a(n)=1 if and only if n is prime. - Zak Seidov, Feb 09 2015
For n > 1, a(n) is the smallest divisor of n such that n/a(n) is prime. - David James Sycamore, Jan 03 2024
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n/A006530(n).
a(A002110(n)) = A002110(n-1), a(p^k) = p^(k-1), p any prime; k >= 1. - David James Sycamore, Jan 03 2024
a(n) = n - A171462(n). - Antti Karttunen, Jan 04 2024
EXAMPLE
a(15) = 15/(largest prime dividing 15) = 15/5 = 3.
MAPLE
a := n -> `if`(n=1, 1, n/max(numtheory[factorset](n)));
seq(a(n), n=1..97); # Peter Luschny, Jul 28 2014
MATHEMATICA
a052126[n_] := Array[If[n == 1, 1, #/FactorInteger[#][[-1]][[1]]] &, n]; a052126[97] (* Michael De Vlieger, Dec 21 2014 *)
PROG
(PARI) gpf(n)=my(f=factor(n)[, 1]); f[#f]
a(n)=if(n<4, return(1)); n/gpf(n) \\ Charles R Greathouse IV, Apr 28 2015
CROSSREFS
KEYWORD
nonn,look
AUTHOR
James A. Sellers, Jan 21 2000
STATUS
approved