login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = n/mpf(n), where mpf(n) is the median prime factor of n (A079879).
2

%I #13 Mar 09 2019 11:26:11

%S 1,1,1,2,1,3,1,4,3,5,1,6,1,7,5,8,1,6,1,10,7,11,1,12,5,13,9,14,1,10,1,

%T 16,11,17,7,18,1,19,13,20,1,14,1,22,15,23,1,24,7,10,17,26,1,18,11,28,

%U 19,29,1,30,1,31,21,32,13,22,1,34,23,14,1,36,1,37,15,38,11,26,1,40,27,41,1,42

%N a(n) = n/mpf(n), where mpf(n) is the median prime factor of n (A079879).

%C A052126(n)<=a(n)<=A032742(n);

%C a(m)=A032742(m)=A052126(m) iff m is a prime power (A000961).

%H Robert Israel, <a href="/A079880/b079880.txt">Table of n, a(n) for n = 1..10000</a>

%p f:= proc(n) local F, F2, m, i;

%p F:= sort(ifactors(n)[2], (i, j) -> i[1]<j[1]);

%p F2:= ListTools:-PartialSums(map2(op, 2, F));

%p for i from 1 do

%p if 2*F2[i]>=F2[-1] then return n/F[i][1] fi

%p od

%p end proc:

%p 1, seq(f(n),n=2..100); # _Robert Israel_, Jan 26 2018

%t mpf[n_] := Module[{fi = FactorInteger[n], ff, Om}, ff = Flatten[Table[ Table[f[[1]], {f[[2]]}], {f, fi}]]; Om = Length[ff]; If[OddQ[Om], ff[[Floor[Om/2]+1]], ff[[Om/2]]]];

%t a[n_] := n/mpf[n];

%t Array[a, 100] (* _Jean-François Alcover_, Mar 09 2019 *)

%Y a(n)=n/A079879(n), A033676.

%K nonn,look

%O 1,4

%A _Reinhard Zumkeller_, Jan 13 2003