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
KEYWORD
nonn,easy
AUTHOR
Jack Braxton, Feb 25 2023
STATUS
approved