OFFSET
1,5
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Euclidean Algorithm.
MATHEMATICA
t[m_, n_] := For[r[-1]=m; r[0]=n; k=1, True, k++, r[k] = Mod[r[k-2], r[k-1]]; If[r[k] == 0, Return[k-1]]]; a[n_] := Numerator[Sum[t[m, n], {m, 0, n}]/n]; Array[a, 100] (* Amiram Eldar, Apr 22 2022 after Jean-François Alcover at A051010 *)
PROG
(Haskell)
import Data.Ratio ((%), numerator)
a051011 n = numerator $ (sum $ a051010_row n) % n
-- Reinhard Zumkeller, Jun 27 2013
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
STATUS
approved