OFFSET
1,7
FORMULA
a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)) * (1 - ceiling(2*(k*i)/(k+i)) + floor(2*(k*i)/(k+i))).
EXAMPLE
a(7) = 2; There are 2 distinct positive integer pairs, (s,t), with s < t < 7 such that neither s nor t divides 7 and the harmonic mean of s and t is an integer. They are (2,6) and (3,6).
MATHEMATICA
Table[Sum[Sum[(1 - Ceiling[2 (i*k)/(k + i)] + Floor[2 (i*k)/(k + i)]) (Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Sep 15 2020
STATUS
approved