login
A122089
a(1)=a(2)=1. a(n) = smallest integer which is greater than a(n-1) and is coprime to (a(n-1)+a(n-2)).
1
1, 1, 3, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 37, 39, 41, 43, 47, 49, 53, 55, 59, 61, 67, 69, 71, 73, 77, 79, 83, 85, 89, 91, 97, 99, 101, 103, 107, 109, 113, 115, 119, 121, 127, 129, 131, 133, 137, 139, 143, 145, 149, 151, 157, 159, 161, 163, 167, 169, 173, 175, 179
OFFSET
1,3
EXAMPLE
a(9) +a(10) = 42. The smallest integer greater than a(10)=23 which is coprime to 42 is 25. So a(11) = 25.
MAPLE
A122089 := proc(maxn) local a, nexta, n ; a := [1, 1] ; for n from 3 to maxn do nexta := op(n-1, a)+1 ; while gcd(nexta, op(n-2, a)+op(n-1, a)) >1 do nexta := nexta+1 ; od ; a := [op(a), nexta] ; od ; RETURN(a) ; end: maxn := 100 : alist := A122089(maxn) : for i from 1 to maxn do printf("%d, ", op(i, alist)) ; end : # R. J. Mathar, Oct 21 2006
MATHEMATICA
f[l_List] := Block[{k = l[[ -1]] + 1}, While[GCD[k, l[[ -1]] + l[[ -2]]] > 1, k++ ]; Append[l, k]]; Nest[f, {1, 1}, 61] (* Ray Chandler, Oct 19 2006 *)
CROSSREFS
Sequence in context: A367227 A355821 A332075 * A109860 A100392 A309203
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 17 2006
EXTENSIONS
Extended by Ray Chandler, Oct 19 2006
More terms from R. J. Mathar, Oct 21 2006
STATUS
approved