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 A079879 #24 Apr 15 2022 13:03:13 %S A079879 1,2,3,2,5,2,7,2,3,2,11,2,13,2,3,2,17,3,19,2,3,2,23,2,5,2,3,2,29,3,31, %T A079879 2,3,2,5,2,37,2,3,2,41,3,43,2,3,2,47,2,7,5,3,2,53,3,5,2,3,2,59,2,61,2, %U A079879 3,2,5,3,67,2,3,5,71,2,73,2,5,2,7,3,79,2,3,2,83,2,5,2,3,2,89,3,7,2,3,2,5,2 %N A079879 Median prime factor: a(1)=1 and for n>1: least prime p such that not more than floor(Omega(n)/2) prime factors are greater than p; Omega(n) is the total number of prime factors of n (A001222). %H A079879 Robert Israel, <a href="/A079879/b079879.txt">Table of n, a(n) for n = 1..10000</a> %H A079879 Jean-Marie De Koninck and Florian Luca, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/DeKoninck/dek14.html">On the Middle Prime Factor of an Integer</a>, Journal of Integer Sequences, Vol. 16 (2013), Article 13.5.5. %H A079879 Nicolas Doyon and Vincent Ouellet, <a href="http://ac.inf.elte.hu/Vol_047_2018/249_47.pdf">On the sum of the reciprocals of the middle prime factor counting multiplicity</a>, Annales Univ. Sci. Budapest., Sect. Comp. 47 (2018) 249-259. %F A079879 A020639(n) <= a(n) <= A006530(n); %F A079879 a(m) = A020639(m) = A006530(m) iff m is a prime power (A000961). %e A079879 a(30)=a(2*3*5)=3; a(60)=a(2*2*3*5)=2; a(72)=a(2*2*2*3*3)=2; a(90)=a(2*3*3*5)=3; a(108)=a(2*2*3*3*3)=3; a(144)=a(2*2*2*2*3*3)=2; a(216)=a(2*2*2*3*3*3)=2. %p A079879 f:= proc(n) local F,F2,m,i; %p A079879 F:= sort(ifactors(n)[2],(i,j) -> i[1]<j[1]); %p A079879 F2:= ListTools:-PartialSums(map2(op,2,F)); %p A079879 for i from 1 do %p A079879 if 2*F2[i]>=F2[-1] then return F[i][1] fi %p A079879 od %p A079879 end proc: %p A079879 1, seq(f(n), n=2..100); # _Robert Israel_, Aug 25 2015 %t A079879 f[n_] := Block[{p = Flatten[Table[#1, {#2}] & @@@ FactorInteger@ n], len}, len = Length@ p; If[OddQ@ len, p[[1 + Floor[len/2]]], p[[len/2]]]]; {1}~Join~Table[f@ n, {n, 2, 96}] (* _Michael De Vlieger_, Aug 25 2015 *) %o A079879 (PARI) a(n) = {if (n==1, return(1)); my(f=factor(n), v=vector(bigomega(f)), j=1); for (k=1, #f~, for (i=1, f[k,2], v[j]=f[k,1]; j++);); v[(#v+1)\2];} \\ _Michel Marcus_, Apr 15 2022 %Y A079879 Cf. A027746, A033676, A001222, A079880, A079881. %K A079879 nonn %O A079879 1,2 %A A079879 _Reinhard Zumkeller_, Jan 13 2003 %E A079879 Typo fixed by _Franklin T. Adams-Watters_, Jul 10 2012