OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Nov 08 2006
EXTENSIONS
Extended by Ray Chandler, Nov 10 2006
STATUS
approved