login
a(n) = Sum_{k=1..n} (-1)^(k-1) * binomial(floor(n/k)+2,3).
5

%I #25 Oct 25 2023 18:21:55

%S 1,3,10,16,32,49,78,100,152,194,261,318,410,489,631,717,871,1014,1205,

%T 1351,1617,1806,2083,2300,2641,2903,3333,3612,4048,4450,4947,5289,

%U 5923,6367,7041,7548,8252,8805,9683,10245,11107,11873,12820,13497,14719,15526,16655

%N a(n) = Sum_{k=1..n} (-1)^(k-1) * binomial(floor(n/k)+2,3).

%H Michael De Vlieger, <a href="/A366395/b366395.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = Sum_{k=1..n} binomial(k+1,2) * (floor(n/k) mod 2).

%F G.f.: -1/(1-x) * Sum_{k>=1} (-x)^k/(1-x^k)^3 = 1/(1-x) * Sum_{k>=1} binomial(k+1,2) * x^k/(1+x^k).

%t Array[Sum[(-1)^(k - 1)*Binomial[Floor[#/k] + 2, 3], {k, #}] &, 56] (* _Michael De Vlieger_, Oct 25 2023 *)

%o (PARI) a(n) = sum(k=1, n, (-1)^(k-1)*binomial(n\k+2, 3));

%Y Partial sums of A365007.

%Y Cf. A078471, A366659, A366723.

%Y Cf. A364970.

%K nonn

%O 1,2

%A _Seiichi Manyama_, Oct 24 2023