login
a(n) = Sum_{k=1..n} floor(n/k + 1/2).
6

%I #11 Feb 08 2022 15:05:52

%S 1,3,6,8,12,15,18,22,26,29,34,37,41,46,51,53,58,64,67,72,77,80,87,90,

%T 95,100,105,110,115,120,123,129,136,139,146,150,153,160,167,170,176,

%U 181,186,191,198,203,208,213,217,225,230,233,242,247,252,257,262,267

%N a(n) = Sum_{k=1..n} floor(n/k + 1/2).

%C 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

%F a(n) = n^2 - Sum_{k=1..n} Sum_{i=n+1..2n} sign(i mod k). - _Wesley Ivan Hurt_, Feb 08 2022

%e [4/1 + 1/2] + [4/2 + 1/2] + [4/3 + 1/2] + [4/4 + 1/2] = 4+2+1+1 = 8 = a(4).

%o (PARI) a(n) = sum(k=1, n, floor(n/k+1/2)); \\ _Michel Marcus_, Feb 07 2022

%Y Cf. A077025.

%K nonn

%O 1,2

%A _Clark Kimberling_, Oct 18 2002