OFFSET
1,2
COMMENTS
Using the Chinese remainder theorem, it is easy to prove that the sequence is infinite.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..500
MAPLE
a:= proc(n) option remember;
local ok, m, k;
if n<3 then 2*n-1
else for m from a(n-1)+1 do
ok:= true;
for k from 1 to n-1 do
if igcd(n, k)=1 xor igcd(m, a(k))=1
then ok:= false; break fi
od;
if ok then break fi
od; m
fi
end:
seq (a(n), n=1..50); # Alois P. Heinz, Nov 21 2010
MATHEMATICA
a[1]=1; a[2]=3; a[n_] := a[n] = For[k = a[n-1]+1, True, k++, If[AllTrue[ Range[n-1], CoprimeQ[k, a[#]] == CoprimeQ[n, #]&], Return[k]]]; Table[ a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 25 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Nov 21 2010
EXTENSIONS
More terms from Alois P. Heinz, Nov 21 2010
STATUS
approved