OFFSET
1,2
COMMENTS
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. Numbers that are 1, 2, or a nonprime number whose prime indices are pairwise coprime are listed in A302696, which is the union of this sequence.
a(n) is the greatest term of A302696 which divides n. - Antti Karttunen, Dec 06 2021
LINKS
EXAMPLE
The divisors of 72 that are 1, 2, or nonprime numbers whose prime indices are pairwise coprime are: {1, 2, 4, 6, 8, 12, 24}, so a(72) = 24.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Max[Select[Divisors[n], #==1||CoprimeQ@@primeMS[#]&]], {n, 100}]
PROG
(PARI)
isA302696(n) = if(isprimepower(n), !(n%2), if(!issquarefree(n>>valuation(n, 2)), 0, my(pis=apply(primepi, factor(n)[, 1])); (lcm(pis)==factorback(pis))));
A327512(n) = vecmax(select(isA302696, divisors(n))); \\ Antti Karttunen, Dec 06 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 19 2019
STATUS
approved