login
a(n) = n-th integer from among those positive integers k where every positive integers <= k and coprime to k is also coprime to n.
0

%I #12 Nov 01 2019 09:29:15

%S 1,2,3,6,5,24,7,14,21,70,11,60,13,140,180,30,17,96,19,170,357,352,23,

%T 132,105,494,75,336,29,840,31,62,924,850,1050,204,37,1064,1287,370,41,

%U 1638,43,836,630,1564,47,276,301,470,2244,1170,53,312,2695,728,2793

%N a(n) = n-th integer from among those positive integers k where every positive integers <= k and coprime to k is also coprime to n.

%e The positive integers k, where every positive integer <= k and coprime to k is also coprime to 6, form the sequence 1,2,6,12,18,24,30,... So a(6) is the 6th of these integers, which is 24. (3, for example, is not among the sequence of k's because 2 is coprime to 3 and is <= 3, but 2 is not coprime to 6.)

%t f[n_] := Select[Range[n], GCD[ #, n] == 1 &];g[n_] := Block[{k = 0, c = n},While[c > 0,k++;While[Times @@ GCD[f[k], n] > 1, k++ ];c--;];k];Table[g[n], {n, 60}] (* _Ray Chandler_, Dec 24 2006 *)

%K nonn

%O 1,2

%A _Leroy Quet_, Dec 22 2006

%E Extended by _Ray Chandler_, Dec 24 2006