OFFSET
1,2
FORMULA
EXAMPLE
The largest prime dividing 12 is 3. The positive integers which are coprime to 3 are 1,2,4,5,7,8,10,11,13,14,16,17,19,20,... The 12th of these is 17, so a(12) = 17.
MAPLE
A126572 := proc(n, k) local f, i ; f := 1 ; for i from 1 do if gcd(i, n) = 1 then if f = k then RETURN(i) ; fi ; f := f+1 ; fi ; od: end: A006530 := proc(n) if n = 1 then 1; else max(seq(op(1, i), i=ifactors(n)[2]) ) ; fi ; end: A132009 := proc(n) local p ; p := A006530(n) ; A126572(p, n) ; end: seq(A132009(n), n=1..100) ; # R. J. Mathar, Nov 09 2007
MATHEMATICA
a = {1}; For[n = 2, n < 70, n++, b = FactorInteger[n][[ -1, 1]]; c = 0; i = 1; While[c < n, If[GCD[i, b] == 1, c++ ]; i++ ]; AppendTo[a, i - 1]]; a (* Stefan Steinerberger, Nov 04 2007 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 29 2007
EXTENSIONS
More terms from Stefan Steinerberger and R. J. Mathar, Nov 04 2007
STATUS
approved