login
A129088
a(1)=a(2)=1; a(n) = gcd(a(n-1), n) + gcd(a(n-2), n).
2
1, 1, 2, 3, 2, 5, 2, 3, 4, 3, 2, 5, 2, 3, 4, 5, 2, 3, 2, 3, 4, 3, 2, 5, 6, 3, 6, 3, 2, 5, 2, 3, 4, 3, 2, 5, 2, 3, 4, 5, 2, 3, 2, 3, 4, 3, 2, 5, 2, 7, 2, 3, 2, 5, 6, 3, 6, 3, 2, 5, 2, 3, 4, 5, 6, 7, 2, 3, 4, 3, 2, 5, 2, 3, 4, 5, 2, 3, 2, 3, 4, 3, 2, 5, 6, 3, 6, 3, 2, 5, 2, 3, 4, 3, 2, 5, 2, 3, 4, 5, 2, 3, 2, 3, 4
OFFSET
1,3
COMMENTS
a(2n) is odd for all n >= 1.
a(2n-1) is even for all n >= 2.
LINKS
MAPLE
a[1]:=1: a[2]:=1: for n from 3 to 140 do a[n]:=gcd(a[n-1], n)+gcd(a[n-2], n) od: seq(a[n], n=1..140); # Emeric Deutsch, Apr 04 2007
PROG
(PARI)
up_to = 105;
A129088list(up_to) = { my(v=vector(up_to)); v[1] = v[2] = 1; for(n=3, up_to, v[n] = gcd(v[n-1], n)+gcd(v[n-2], n)); (v); };
v129088 = A129088list(up_to);
A129088(n) = v129088[n]; \\ Antti Karttunen, Apr 01 2021
CROSSREFS
Cf. A129089.
Sequence in context: A101876 A260218 A087986 * A086418 A100761 A336964
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 29 2007
EXTENSIONS
More terms from Emeric Deutsch, Apr 04 2007
STATUS
approved