login
A077024
a(n) = Sum_{k=1..n} floor(n/k + 1/2).
6
1, 3, 6, 8, 12, 15, 18, 22, 26, 29, 34, 37, 41, 46, 51, 53, 58, 64, 67, 72, 77, 80, 87, 90, 95, 100, 105, 110, 115, 120, 123, 129, 136, 139, 146, 150, 153, 160, 167, 170, 176, 181, 186, 191, 198, 203, 208, 213, 217, 225, 230, 233, 242, 247, 252, 257, 262, 267
OFFSET
1,2
COMMENTS
Number of ways the numbers from 1..n can divide the numbers from n+1..2n. For example, a(4) = 8; there are 8 ways that the numbers from 1..4 divide the numbers 5..8. 1 divides 5,6,7,8 (4 ways) + 2 divides 6,8 (2 ways) + 3 divides 6 (1 way) + 4 divides 8 (1 way) = 8 ways. - Wesley Ivan Hurt, Feb 07 2022
FORMULA
a(n) = n^2 - Sum_{k=1..n} Sum_{i=n+1..2n} sign(i mod k). - Wesley Ivan Hurt, Feb 08 2022
EXAMPLE
[4/1 + 1/2] + [4/2 + 1/2] + [4/3 + 1/2] + [4/4 + 1/2] = 4+2+1+1 = 8 = a(4).
PROG
(PARI) a(n) = sum(k=1, n, floor(n/k+1/2)); \\ Michel Marcus, Feb 07 2022
CROSSREFS
Cf. A077025.
Sequence in context: A118335 A189630 A298793 * A338722 A185549 A185597
KEYWORD
nonn
AUTHOR
Clark Kimberling, Oct 18 2002
STATUS
approved