|
|
A125554
|
|
a(0)=2. a(n) = the a(n-1)th integer from among those positive integers coprime to n.
|
|
1
|
|
|
2, 2, 3, 4, 7, 8, 23, 26, 51, 76, 189, 207, 619, 670, 1563, 2929, 5857, 6223, 18667, 19704, 49259, 86203, 189645, 198265, 594793, 743491, 1610897, 2416345, 5638137, 5839499, 21898121, 22628058, 45256115, 74672590, 158679253, 231407243
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
EXAMPLE
|
The positive integers coprime to 6 are 1,5,7,11,13,17,19,23,25,29,31,...Since a(5) = 8, a(6) is 23, the 8th integer in the sequence of positive integers coprime to 6.
|
|
MAPLE
|
copr := proc(i, n) local res, j ; res := 1 ; j := 1; while j<i do res := res+1 ; while gcd(res, n) > 1 do res := res+1 ; od ; j := j+1 ; od ; RETURN(res) ; end; A125554 := proc(nmax) local a, anext; a := [2] ; while nops(a) < nmax do anext := copr(op(-1, a), nops(a)) ; a := [op(a), anext] ; od ; RETURN(a) ; end ; A125554(26) ; # R. J. Mathar, Jan 07 2007
|
|
MATHEMATICA
|
f[m_, n_] := Block[{k, c, x}, x = Floor[m/EulerPhi[n]] - 1; k = x*n; c = m - x*EulerPhi[n]; While[c > 0, k++; While[GCD[k, n] > 1, k++ ]; c--; ]; k]; g[l_List] := Append[l, f[l[[ -1]], Length[l]]]; Nest[g, {2}, 36] (* Ray Chandler, Jan 05 2007 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|