OFFSET
1,2
COMMENTS
Is this a permutation of all natural numbers?
For n>1, gcd(a(n),a(n+1))=1 iff a(n)=prime(2k) and a(n+1)=prime(2k+1).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
MAPLE
b:= proc(n) n>2 end:
a:= proc(n) option remember; local k;
if n<3 then n else for k do if b(k) and a(n-1)
= igcd(a(n-2), a(n-1))*igcd(a(n-1), k) then
b(k):= false; return k fi od
fi
end:
seq(a(n), n=1..100); # Alois P. Heinz, Jul 09 2015
MATHEMATICA
a[1] = 1; a[2] = 2;
used = {1, 2};
a[n_] := a[n] = For[k = 1, True, k++, If[FreeQ[used, k], If[GCD[a[n-2], a[n-1]] GCD[a[n-1], k] == a[n-1], AppendTo[used, k]; Return[k]]]];
Array[a, 100] (* Jean-François Alcover, Nov 23 2020 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Thomas Ordowski, Jul 06 2015
EXTENSIONS
More terms from Alois P. Heinz, Jul 09 2015
STATUS
approved