A124823 a(n) = n-th integer from among those positive integers which are coprime to n(n+1)/2.
1, 2, 7, 9, 8, 10, 15, 23, 16, 13, 35, 37, 16, 31, 53, 33, 26, 28, 49, 83, 40, 25, 71, 89, 33, 41, 95, 67, 56, 58, 63, 103, 58, 53, 151, 109, 40, 64, 157, 101, 73, 74, 95, 179, 88, 49, 143, 167, 71, 98, 175, 113, 80, 109, 173, 199, 92, 61, 223, 227, 64, 110, 221, 173, 142
Offset: 1
Examples
The positive integers which are coprime to (5*6/2)=15 are 1,2,4,7,8,11,13,14... The fifth of these integers is 8, so a(5) = 8.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A124822.
Programs
-
Maple
f:= proc(n) local t,k, count; t:= n*(n+1)/2; count:= 0; for k from 1 do if igcd(k,t)=1 then count:= count+1; if count = n then return k fi fi od end proc: map(f, [$1..100]); # Robert Israel, Mar 29 2018
-
Mathematica
f[n_] := Block[{k = 0, c = n},While[c > 0,k++;While[GCD[n*(n + 1)/2, k] > 1, k++ ];c--;];k];Table[f[n], {n, 65}] (* Ray Chandler, Nov 10 2006 *)
Extensions
Extended by Ray Chandler, Nov 10 2006