OFFSET
1,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
For n >= 9, a(n) = 2n.
EXAMPLE
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.
MATHEMATICA
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 *)
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 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Dec 21 2005
EXTENSIONS
Extended by Ray Chandler, Dec 24 2005
STATUS
approved