OFFSET
1,4
COMMENTS
a(1)'s value is arbitrary. Replacing a(1) with any integer would not alter the rest of the sequence.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(14) = gcd(a(13) + a(12), 12) = gcd(1+2, 12) = gcd(3, 12) = 3.
MAPLE
a[1]:=0: a[2]:=1: for n from 3 to 135 do a[n]:=gcd(a[n-1]+a[n-2], n-2) od: seq(a[n], n=1..117); # Emeric Deutsch, Feb 07 2006
MATHEMATICA
nxt[{n_, a_, b_}]:={n+1, b, GCD[a+b, n-1]}; NestList[nxt, {2, 0, 1}, 110][[All, 2]] (* Harvey P. Dale, Jun 13 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 30 2006
EXTENSIONS
More terms from Emeric Deutsch, Feb 07 2006
STATUS
approved