OFFSET
1,2
COMMENTS
A squarefree number with prime factorization prime(m_1) * ... * prime(m_k) is connected if the simple labeled graph with vertex set {m_1,...,m_k} and edges between any two vertices with a common divisor greater than 1 is connected. Connected numbers are listed in A305078.
LINKS
EXAMPLE
The connected squarefree divisors of 189 are {1, 3, 7, 21}, so a(189) = 21.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
zsm[s_]:=With[{c=Select[Tuples[Range[Length[s]], 2], And[Less@@#, GCD@@s[[#]]]>1&]}, If[c=={}, s, zsm[Sort[Append[Delete[s, List/@c[[1]]], LCM@@s[[c[[1]]]]]]]]];
Table[Max[Select[Divisors[n], SquareFreeQ[#]&&Length[zsm[primeMS[#]]]<=1&]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 20 2019
STATUS
approved