login
A259840
a(1)=1, a(2)=2; a(n+2) is the smallest number not occurring earlier such that gcd(a(n),a(n+1)) * gcd(a(n+1),a(n+2)) = a(n+1).
1
1, 2, 4, 6, 3, 5, 10, 8, 12, 9, 15, 20, 16, 28, 7, 11, 22, 14, 21, 18, 24, 44, 33, 27, 36, 32, 40, 25, 30, 42, 35, 45, 54, 48, 56, 49, 63, 72, 64, 88, 55, 50, 60, 66, 77, 70, 80, 104, 13, 17, 34, 26, 39, 51, 68, 52, 65, 75, 90, 78, 91, 84, 96, 136, 85, 95, 19
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
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
Sequence in context: A331522 A075075 A088178 * A161184 A349543 A140645
KEYWORD
nonn,look
AUTHOR
Thomas Ordowski, Jul 06 2015
EXTENSIONS
More terms from Alois P. Heinz, Jul 09 2015
STATUS
approved