OFFSET
1,2
COMMENTS
If n has non-unitary prime divisors, then divide it by the square of the smallest of them and multiply by a single instance of the next larger prime.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
For n = 12 = 2*2*3, the smallest non-unitary prime divisor (and in this case the only one) is 2, thus we divide with 2^2 and multiply with the next larger prime 3, to get ((2^2 * 3)/(2^2))*3 = 3*3, thus a(12) = 9.
For n = 16 = 2^4, we divide two instances of 2 out and multiply by a single instance of 3 to get 2*2*3 = 12.
MATHEMATICA
Table[If[SquareFreeQ@ n, n, Prime[1 + PrimePi@ Min[Select[FactorInteger[n][[All, 1]], ! CoprimeQ[#, n/#] &] /. {} -> 0]] (n/If[SquareFreeQ@ n, 1, p = 2; While[! Divisible[n, p^2], p = NextPrime@ p]; p]^2)], {n, 81}] (* Michael De Vlieger, Nov 15 2016 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 08 2016
STATUS
approved