login
a(1)=a(2)=1. For n >= 3, a(n) is smallest integer > a(n-1) such that gcd(a(n), a(n-1) + a(n-2)) > 1.
1

%I #14 Oct 26 2019 18:02:55

%S 1,1,2,3,5,6,11,17,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,

%T 52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,

%U 98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132

%N a(1)=a(2)=1. For n >= 3, a(n) is smallest integer > a(n-1) such that gcd(a(n), a(n-1) + a(n-2)) > 1.

%H Harvey P. Dale, <a href="/A112598/b112598.txt">Table of n, a(n) for n = 1..1000</a>

%F For n >= 9, a(n) = 2n.

%e 6 = a(6) is the smallest integer > a(5) = 5 such that gcd(a(6), a(5)+a(4)) > 1, since gcd(6,5+3) = 2.

%t f[l_] := Block[{k, s}, k = l[[ -1]]; s = k + l[[ -2]]; k++; While[GCD[k, s] == 1, k++ ]; Return[Append[l, k]];]; Nest[f, {1, 1}, 64] (* _Ray Chandler_, Dec 24 2005 *)

%t nxt[{a_,b_}]:=Module[{c=b+1},{b,While[GCD[c,a+b]<2,c++];c}]; Transpose[ NestList[ nxt,{1,1},70]][[1]] (* _Harvey P. Dale_, Jul 31 2014 *)

%Y Cf. EKG sequence A064413.

%K easy,nonn

%O 1,3

%A _Leroy Quet_, Dec 21 2005

%E Extended by _Ray Chandler_, Dec 24 2005