login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A360884
a(n) = a(n-1) + a(n-2) + gcd(a(n-1), n), a(1) = a(2) = 1.
0
1, 1, 3, 5, 13, 19, 33, 53, 87, 141, 229, 371, 601, 973, 1575, 2549, 4125, 6677, 10803, 17481, 28287, 45769, 74057, 119827, 193885, 313713, 507625, 821339, 1328965, 2150309, 3479275, 5629585, 9108861, 14738447, 23847309, 38585765, 62433075, 101018841, 163451919, 264470761, 427922681, 692393443
OFFSET
1,3
FORMULA
a(n) = a(n-1) + a(n-2) + gcd(a(n-1), n), a(1) = a(2) = 1.
EXAMPLE
a(5) = 3 + 5 + gcd(5, 5) = 13.
MAPLE
a:= proc(n) option remember; procname(n-1)+procname(n-2) + igcd(procname(n-1), n) end proc:
a(1):= 1: a(2):= 1:
map(a, [$1..50]); # Robert Israel, Feb 28 2023
PROG
(Python)
from math import gcd
a = [0, 1, 1]
[a.append(a[n-1]+a[n-2]+gcd(a[n-1], n)) for n in range(3, 65)]
print(a[1:])
# With help from Michael S. Branicky, Feb 25 2023
CROSSREFS
Sequence in context: A081353 A238092 A024820 * A038941 A141215 A191039
KEYWORD
nonn,easy
AUTHOR
Jack Braxton, Feb 25 2023
STATUS
approved