OFFSET
1,2
FORMULA
MAPLE
g:= proc(x, y) option remember;
`if`(y=0, 0, 1+g(y, irem(x, y)))
end:
a:= proc(n) option remember; `if`(n=0, 0,
a(n-1)+add(g(j, n), j=1..n-1))
end:
seq(a(n), n=1..100); # Alois P. Heinz, Dec 05 2023
MATHEMATICA
g[x_, y_] := g[x, y] = If[y == 0, 0, 1 + g[y, Mod[x, y]]];
a[n_] := a[n] = If[n == 0, 0, a[n - 1] + Sum[g[j, n], { j, 1, n - 1}]];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 08 2024, after Alois P. Heinz *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Darío Clavijo, Dec 05 2023
STATUS
approved