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 A261969 #28 Feb 16 2019 09:22:39 %S A261969 1,2,3,2,5,6,7,2,3,10,11,2,13,14,15,2,17,3,19,2,21,22,23,2,5,26,3,2, %T A261969 29,30,31,2,33,34,35,6,37,38,39,2,41,42,43,2,3,46,47,2,7,5,51,2,53,3, %U A261969 55,2,57,58,59,2,61,62,3,2,65,66,67,2,69,70,71,2,73,74,5,2,77,78,79,2,3,82,83,2,85,86,87,2,89,3,91 %N A261969 Product of primes dividing n with maximum multiplicity. %C A261969 a(1) = 1 by convention. %C A261969 If n is prime then a(n) = n; e.g., a(2) = 2, a(3) = 3, a(5) = 5, etc. Also if n is nonsquare semiprime then a(n) = n; e.g., a(6) = 6, a(10) = 10, a(14) = 14, a(15) = 15, etc. - _Zak Seidov_, Sep 07 2015 %C A261969 a(n)= n precisely when n is squarefree. - _Franklin T. Adams-Watters_, Feb 16 2019 %H A261969 Reinhard Zumkeller, <a href="/A261969/b261969.txt">Table of n, a(n) for n = 1..10000</a> %e A261969 18 = 2^1 * 3^2. 2 is the maximum exponent, 3 is the only prime with that exponent, so a(18) = 3. %e A261969 36 = 2^2 * 3^2, maximum exponent 2 for both 2 and 3, so a(36) = 2*3 = 6. %p A261969 a:= n-> (l->(m->mul(`if`(m=j[2], j[1], 1), j=l))( %p A261969 max(seq(i[2], i=l))))(ifactors(n)[2]): %p A261969 seq(a(n), n=1..100); # _Alois P. Heinz_, Sep 07 2015 %t A261969 f[n_] := Block[{pf = FactorInteger@ n}, Times @@ Take[First /@ pf, Flatten@ Position[Last /@ pf, Max[Last /@ pf]]]]; f /@ Range@ 91 (* _Michael De Vlieger_, Sep 07 2015 *) %o A261969 (PARI) a(n) = my(fm=factor(n),m); if(n<2,return(n)); m=vecmax(fm[,2]~); prod(k=1,#fm[,2]~,if(fm[k,2]==m,fm[k,1],1)) %o A261969 (PARI) a(n) = {my(f = factor(n)); if (n>1, m = vecmax(f[,2])); for (i=1, #f~, f[i,2] = (f[i,2]==m)); factorback(f);} \\ _Michel Marcus_, Sep 08 2015 %o A261969 (Haskell) %o A261969 a261969 n = product $ map fst $ filter ((== emax) . snd) $ zip ps es %o A261969 where emax = maximum es %o A261969 ps = a027748_row n; es = a124010_row n %o A261969 -- _Reinhard Zumkeller_, Sep 08 2015 %Y A261969 Cf. A007947. %Y A261969 Cf. A000040, A001358. - _Zak Seidov_, Sep 07 2015 %Y A261969 Cf. A027748, A124010, A051903. %K A261969 nonn %O A261969 1,2 %A A261969 _Franklin T. Adams-Watters_, Sep 07 2015