A337684 Number of distinct positive integer pairs, (s,t), such that s < t < n where neither s, t, nor (s + t) divides n.
0, 0, 0, 0, 2, 1, 8, 5, 13, 13, 32, 14, 50, 40, 51, 50, 98, 61, 128, 85, 128, 142, 200, 114, 220, 217, 241, 219, 338, 221, 392, 309, 390, 415, 449, 337, 578, 538, 575, 478, 722, 540, 800, 677, 720, 832, 968, 680, 1011, 916, 1053, 1002, 1250, 1002, 1247, 1096, 1346, 1393, 1568
Offset: 1
Examples
a(7) = 8; There are 8 distinct positive integer pairs, (s,t), such that s < t < 7 where neither s, t, nor (s + t) divides n. They are (2,3), (2,4), (2,6), (3,5), (3,6), (4,5), (4,6) and (5,6).
Programs
-
Mathematica
Table[Sum[Sum[(Ceiling[n/(k + i)] - Floor[n/(k + i)]) (Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 80}]
Formula
a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)) * (ceiling(n/(i+k)) - floor(n/(i+k))).