login
A119991
a(n) = n-th positive integer which is coprime to the n-th composite positive integer.
1
1, 5, 5, 5, 11, 17, 15, 14, 17, 29, 27, 20, 27, 41, 18, 33, 25, 41, 71, 39, 34, 45, 33, 71, 51, 41, 67, 97, 63, 56, 63, 95, 38, 83, 55, 77, 109, 52, 89, 62, 83, 157, 87, 76, 89, 62, 155, 101, 76, 143, 151, 105, 98, 113, 71, 181, 141, 86, 119, 209, 81, 125, 97, 139, 241, 83
OFFSET
1,2
EXAMPLE
1,2,4,5,7,8,10,11,...is the sequence of positive integers which are coprime to the 4th composite = 9. 5 is the 4th such integer, so a(4) = 5.
MAPLE
A119991 := proc(nmax) local a, n, i, j, ncomp ; ncomp := [] ; n := 4 ; while nops(ncomp) < nmax do if not isprime(n) then ncomp := [op(ncomp), n] ; fi ; n := n+1 ; od ; a := [] ; for n from 1 to nops(ncomp) do j := 0 ; i := 1 ; while true do if gcd(i, ncomp[n]) = 1 then j := j+1 ; if j = n then a := [op(a), i] ; break ; fi ; fi ; i := i+1 ; od ; od ; RETURN(a) ; end: an := A119991(100) : for i from 1 to nops(an) do printf("%d, ", an[i]) ; od ; # R. J. Mathar, Aug 06 2006
CROSSREFS
Sequence in context: A127310 A214925 A101597 * A262947 A265821 A266953
KEYWORD
nonn
AUTHOR
Leroy Quet, Aug 03 2006
EXTENSIONS
More terms from R. J. Mathar, Aug 06 2006
STATUS
approved