OFFSET
0,2
LINKS
Ivan Neretin, Table of n, a(n) for n = 0..10000
EXAMPLE
The first 8 terms of the sequence (a(0) through a(7)) are 1,2,3,5,7,9,8,13. Of these there are 6 terms that are coprime to 8 (those terms being 1, 3, 5, 7, 9 and 13). So a(8) is the 6th positive integer missing from the first 8 terms of the sequence (i.e., is the 6th integer of the sequence 4, 6, 10, 11, 12, 14, 15, 16, ...). So a(8) = 14.
MATHEMATICA
a = {1}; Do[AppendTo[a, Complement[Range[2 Max@a], a][[Length@Select[a, GCD[#, n] == 1 &]]]], {n, 69}]; a (* Ivan Neretin, Feb 26 2018 *)
PROG
(Magma) find:=function(S, k) c:=0; j:=0; while j lt #S and c lt k do j+:=1; if S[j] eq 0 then c+:=1; end if; end while; if c eq k then return j; else return 0; end if; end function;
z:=150; m:=70; W:=[ 0: n in [1..z] ]; V:=[1]; W[1]:=1; for n in [1..m] do c:=#[ j: j in [1..#V] | Gcd(n, V[j]) eq 1 ]; a:=find(W, c); if a eq 0 then break; end if; W[a]:=1; Append(~V, a); end for; print V; // Klaus Brockhaus, Jul 30 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 29 2006
EXTENSIONS
Extended by Klaus Brockhaus, Jul 30 2009
STATUS
approved