OFFSET
1,3
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
EXAMPLE
a(7) = gcd(1, a(6)) + gcd(2, a(5)) + gcd(3, a(4)) + gcd(4, a(3)) + gcd(5, a(2)) + gcd(6, a(1)) = 1 + 1 + 3 + 2 + 1 + 1 = 9.
MATHEMATICA
Fold[Append[#1, Total@Table[GCD[#1[[#2 - k]], k], {k, #2 - 1}]] &, {1}, Range[2, 54]] (* Ivan Neretin, Oct 04 2017 *)
PROG
(PARI) lista(nn) = my(va = vector(nn)); va[1] = 1; for (m=1, nn-1, va[m+1] = sum(k=1, m, gcd(k, va[m+1-k])); ); va; \\ Michel Marcus, Oct 05 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Feb 25 2000
STATUS
approved