OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The 12th composite is 21. The divisors of 21 are 1,3,7,21. The divisors of 21 that are coprime to 12 are 1 and 7. 7 is the largest of these; so a(12) = 7.
MAPLE
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: A137924 := proc(n) local dvs, d ; dvs := sort(convert(numtheory[divisors](A002808(n)), list), `>`) ; for d in dvs do if gcd(d, n) = 1 then RETURN(d) ; fi ; od: end: seq(A137924(n), n=1..80) ; # R. J. Mathar, Mar 03 2008
MATHEMATICA
a = {}; c = 4; For[n = 1, n < 80, n++, AppendTo[a, Select[Divisors[c], GCD[ #, n] == 1 &][[ -1]]]; If[PrimeQ[c + 1], c = c + 2, c = c + 1]]; a (* Stefan Steinerberger, Mar 09 2008 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Feb 23 2008
EXTENSIONS
More terms from R. J. Mathar and Stefan Steinerberger, Mar 03 2008
STATUS
approved