login
A337679
Number of distinct positive integer pairs, (s,t), such that s < t < n where neither s nor t divides n, and (s + t) | n.
8
0, 0, 0, 0, 1, 0, 2, 1, 2, 2, 4, 1, 5, 5, 4, 5, 7, 5, 8, 6, 8, 11, 10, 6, 11, 14, 12, 12, 13, 10, 14, 16, 16, 20, 16, 14, 17, 23, 20, 18, 19, 21, 20, 26, 21, 29, 22, 23, 24, 30, 28, 33, 25, 33, 28, 32, 32, 38, 28, 28, 29, 41, 34, 42, 34, 44, 32, 47, 40, 43, 34, 41, 35, 50, 44, 54
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(n/(i+k)) + floor(n/(i+k))).
EXAMPLE
a(7) = 2; There are 5 positive integers less than 7 that do not divide 7, {2,3,4,5,6}. Of these numbers, there are two pairs, (s,t), such that s < t < 7 where (s + t) | 7. They are (2,5) and (3,4). So a(7) = 2.
MATHEMATICA
Table[Sum[Sum[(1 - Ceiling[n/(i + k)] + Floor[n/(i + k)]) (Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 80}]
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Sep 15 2020
STATUS
approved