|
|
A112598
|
|
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
|
|
|
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, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|