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”).
%I #11 May 24 2017 14:31:03
%S 1,1,3,4,1,1,1,8,9,5,11,4,13,7,3,1,17,9,19,5,7,11,23,1,25,2,27,1,29,2,
%T 31,1,33,17,35,9,37,38,39,40,41,7,43,44,45,46,47,3,49,1,17,13,53,27,5,
%U 7,57,58,59,5,61,31,7,1,13,66,67,68,69,14,71,9,73,37,25,19,11,39,79,1,1
%N a(n) = the largest divisor of n that is coprime to A002808(n). (A002808(n) = the n-th composite.)
%H Harvey P. Dale, <a href="/A137925/b137925.txt">Table of n, a(n) for n = 1..1000</a>
%e The 12th composite is 21. The divisors of 12 are 1,2,3,4,6,12. The divisors of 12 that are coprime to 21 are 1,2,4. 4 is the largest of these, so a(12) = 4.
%p A002808 := proc(n) option remember ; local a; if n = 1 then 4; else for a from A002808(n-1)+1 do if not isprime(a) then RETURN(a) ; fi ; od: fi ; end: A137925 := proc(n) local dvs,d,a002808 ; a002808 := A002808(n) ; dvs := sort(convert(numtheory[divisors](n),list),`>`) ; for d in dvs do if gcd(d,a002808) = 1 then RETURN(d) ; fi ; od: end: seq(A137925(n),n=1..120) ; # _R. J. Mathar_, Apr 17 2008
%t ldc[{n_,x_}]:=Module[{divs=Divisors[n]},Max[Select[divs,CoprimeQ[ #,x]&]]]; Module[{nn=120,c,len},c=Select[Range[nn],CompositeQ];len=Length[c];ldc/@Thread[{Range[len],c}]] (* _Harvey P. Dale_, May 24 2017 *)
%Y Cf. A137924.
%K nonn
%O 1,3
%A _Leroy Quet_, Feb 23 2008
%E More terms from _R. J. Mathar_, Apr 17 2008