This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A324388 #11 Jun 24 2025 10:41:40 %S A324388 1,2,3,4,5,3,7,8,9,5,11,4,13,7,5,16,17,9,19,5,7,11,23,8,25,13,27,7,29, %T A324388 15,31,32,11,17,7,9,37,19,13,8,41,21,43,11,9,23,47,16,49,25,17,13,53, %U A324388 27,11,8,19,29,59,20,61,31,9,64,13,33,67,17,23,35,71,9,73,37,25,19,11,39,79,16,81,41,83,28,17,43,29,11,89,45 %N A324388 If n is a prime power (in A000961), then a(n) = n, otherwise a(n) is the greatest proper unitary divisor of n. %H A324388 Antti Karttunen, <a href="/A324388/b324388.txt">Table of n, a(n) for n = 1..20000</a> %H A324388 Michael De Vlieger, <a href="/A324388/a324388.png">Log log scatterplot of a(n)</a>, n = 1..2^14, with a color function showing prime n in red, n that is a proper prime power in gold, n that is composite and squarefree in green, and n that is neither squarefree nor prime power in blue and magenta, where magenta signifies powerful n that is not a prime power. %t A324388 a[n_] := If[PrimePowerQ[n], n, SelectFirst[Transpose@ {Reverse@ #[[-Ceiling[Length[#]/2] ;; -2]], #[[2 ;; Ceiling[Length[#]/2]]]} &@ Divisors[n], CoprimeQ @@ # &][[1]] ]; a[1] = 1; Array[a, 120] (* _Michael De Vlieger_, Jun 24 2025 *) %o A324388 (PARI) A324388(n) = if(1>=omega(n),n,fordiv(n,d,if((d>1)&&(1==gcd(d,n/d)),return(n/d)))); %Y A324388 Cf. A000961, A306264. %K A324388 nonn %O A324388 1,2 %A A324388 _Antti Karttunen_ and _David James Sycamore_, Feb 28 2019