# J, 17 bytes, 14/17 = 0.8235

    (+/@(!+:)&i.-)@>:

Computes [A002478][1].

[1]: http://oeis.org/A002478