OFFSET
1,1
COMMENTS
a(n) = A123624(n) / n.
From Robert Israel, Apr 02 2017: (Start)
If n is squarefree, a(n) is the product of the least two primes coprime to n.
Otherwise a(n) = 2. (End)
LINKS
R. Zumkeller, Table of n, a(n) for n = 1..10000
MAPLE
a:= proc(n) local r, p, count;
if not numtheory:-issqrfree(n) then return 2 fi;
r:= 1; count:= 0; p:= 1;
do
p:= nextprime(p);
if n mod p > 0 then
count:= count+1;
r:= r*p;
if count = 2 then return r fi
fi
od
end proc:
map(a, [$1..1000]); # Robert Israel, Apr 02 2017
MATHEMATICA
a[n_] := Module[{r = 1, p = 1, count = 0}, If[!SquareFreeQ[n], Return[2]]; While[True, p = NextPrime[p]; If[Mod[n, p] > 0, count++; r = r*p; If[count == 2, Return[r]]]]]; Array[a, 100] (* Jean-François Alcover, Feb 13 2018, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 03 2006
EXTENSIONS
Name corrected by Robert Israel, Apr 02 2017
STATUS
approved