cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A051011 Numerator of average of number of steps in Euclidean algorithm for all gcd(m,n) with 0<=m

Original entry on oeis.org

0, 1, 1, 1, 8, 7, 13, 7, 16, 17, 27, 5, 32, 31, 31, 17, 46, 41, 55, 11, 50, 5, 73, 9, 68, 73, 25, 18, 96, 71, 101, 45, 32, 105, 101, 23, 124, 119, 41, 11, 146, 113, 155, 3, 44, 151, 177, 23, 164, 161, 169, 41, 204, 167, 183, 83, 64, 201, 231, 44, 240, 223, 209, 109
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A034883, A051010, A051012 (denominators).

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    a051011 n = numerator $ (sum $ a051010_row n) % n
    -- Reinhard Zumkeller, Jun 27 2013
  • 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 *)