cp's OEIS Frontend

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.

A080367 Largest unitary prime divisor of n or a(n) = 0 if no such prime divisor exists.

This page as a plain text file.
%I A080367 #25 Aug 17 2024 09:01:53
%S A080367 0,2,3,0,5,3,7,0,0,5,11,3,13,7,5,0,17,2,19,5,7,11,23,3,0,13,0,7,29,5,
%T A080367 31,0,11,17,7,0,37,19,13,5,41,7,43,11,5,23,47,3,0,2,17,13,53,2,11,7,
%U A080367 19,29,59,5,61,31,7,0,13,11,67,17,23,7,71,0,73,37,3,19,11,13,79,5,0,41,83,7
%N A080367 Largest unitary prime divisor of n or a(n) = 0 if no such prime divisor exists.
%C A080367 See [Grah, Section 5] for growth rate of the partial sums. - _R. J. Mathar_, Mar 03 2009
%H A080367 Reinhard Zumkeller, <a href="/A080367/b080367.txt">Table of n, a(n) for n = 1..10000</a>
%H A080367 Jacques Grah, <a href="http://dx.doi.org/10.1007/BF01305777">Comportement moyen du cardinal de certains ensembles de facteurs premiers</a>, Monatsh. Math. 118 (1994) 91-109. [From _R. J. Mathar_, Mar 03 2009]
%F A080367 from _Amiram Eldar_, Aug 17 2024: (Start)
%F A080367 a(n) = 0 if and only of n is powerful (A001694).
%F A080367 a(n) = A006530(A055231(n)) if n is not powerful. (End)
%e A080367 For n = 252100 = 2*2*3*5*5*7*11*11, the unitary prime divisors are {3,7}, the largest is 7, so a(252100) = 7.
%t A080367 ffi[x_] := Flatten[FactorInteger[x]]; lf[x_] := Length[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; gb[x_] := GCD[ba[x], x/ba[x]]; fpg[x_] := Flatten[Position[gb[x], 1]]; upd[x_] := Part[ba[x], fpg[x]]; mxu[x_] := Max[upd[x]]; miu[x_] := Min[upd[x]]; Do[If[Equal[upd[n], {}], Print[0]]; If[ !Equal[upd[n], {}], Print[mxu[n]]], {n, 2, 256}]
%t A080367 a[n_] := Max[Join[Select[FactorInteger[n], Last[#] == 1 &][[;; , 1]], {0}]]; a[1] = 0; Array[a, 100] (* _Amiram Eldar_, Aug 17 2024 *)
%o A080367 (Haskell)
%o A080367 a080367 n = if null us then 0 else fst $ last us
%o A080367   where us = filter ((== 1) . snd) $ zip (a027748_row n) (a124010_row n)
%o A080367 -- _Reinhard Zumkeller_, Jul 23 2014
%o A080367 (PARI) a(n) = {my(f = factor(n), pmax = 0); for(i = 1, #f~, if(f[i, 2] == 1 && f[i, 1] > pmax, pmax = f[i, 1])); pmax;} \\ _Amiram Eldar_, Aug 17 2024
%Y A080367 Cf. A034444, A056169, A080368.
%Y A080367 Cf. A001694, A006530, A027748, A055231, A124010.
%K A080367 nonn,easy
%O A080367 1,2
%A A080367 _Labos Elemer_, Feb 21 2003