login
A123338
a(0) = a(1) = 1. For n >= 2, a(n) = largest divisor of (a(n-1) + a(n-2)) which is coprime to n.
1
1, 1, 1, 2, 3, 1, 1, 2, 3, 5, 1, 6, 7, 1, 1, 2, 3, 5, 1, 6, 7, 13, 5, 18, 23, 41, 1, 14, 15, 1, 1, 2, 3, 5, 1, 6, 7, 13, 5, 2, 7, 9, 1, 10, 1, 11, 3, 14, 17, 31, 3, 2, 5, 7, 1, 8, 9, 17, 13, 30, 43, 73, 29, 34, 63, 97, 5, 102, 107, 209, 79, 288, 367, 655, 511, 1166, 1677, 2843, 565, 3408
OFFSET
0,4
LINKS
EXAMPLE
a(20)+a(21) = 20. The largest divisor of 20 which is coprime to 22 is 5. So a(22) = 5.
MATHEMATICA
t[n_, m_] := Last[Select[Divisors[m], GCD[ #, n] == 1 &]]; f[l_List] := Append[l, t[Length[l], l[[ -1]] + l[[ -2]]]]; Nest[f, {1, 1}, 80] (* Ray Chandler, Oct 17 2006 *)
CROSSREFS
Sequence in context: A111879 A193280 A114732 * A152735 A249128 A299481
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 11 2006
EXTENSIONS
Extended by Ray Chandler, Oct 17 2006
STATUS
approved