login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #22 Nov 23 2020 14:20:44

%S 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,

%T 40,25,30,42,35,45,54,48,56,49,63,72,64,88,55,50,60,66,77,70,80,104,

%U 13,17,34,26,39,51,68,52,65,75,90,78,91,84,96,136,85,95,19

%N 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).

%C Is this a permutation of all natural numbers?

%C For n>1, gcd(a(n),a(n+1))=1 iff a(n)=prime(2k) and a(n+1)=prime(2k+1).

%H Alois P. Heinz, <a href="/A259840/b259840.txt">Table of n, a(n) for n = 1..10000</a>

%p b:= proc(n) n>2 end:

%p a:= proc(n) option remember; local k;

%p if n<3 then n else for k do if b(k) and a(n-1)

%p = igcd(a(n-2), a(n-1))*igcd(a(n-1), k) then

%p b(k):= false; return k fi od

%p fi

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jul 09 2015

%t a[1] = 1; a[2] = 2;

%t used = {1, 2};

%t 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]]]];

%t Array[a, 100] (* _Jean-François Alcover_, Nov 23 2020 *)

%K nonn,look

%O 1,2

%A _Thomas Ordowski_, Jul 06 2015

%E More terms from _Alois P. Heinz_, Jul 09 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:38 EDT 2024. Contains 371794 sequences. (Running on oeis4.)