A365007 a(n) = Sum_{d|n} (-1)^(n/d-1) * binomial(d+1,2).
1, 2, 7, 6, 16, 17, 29, 22, 52, 42, 67, 57, 92, 79, 142, 86, 154, 143, 191, 146, 266, 189, 277, 217, 341, 262, 430, 279, 436, 402, 497, 342, 634, 444, 674, 507, 704, 553, 878, 562, 862, 766, 947, 677, 1222, 807, 1129, 857, 1254, 992, 1486, 942, 1432, 1250, 1622, 1079
Offset: 1
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[DivisorSum[n, (-1)^(n/# - 1)*Binomial[# + 1, 2] &], {n, 56}] (* Michael De Vlieger, Oct 25 2023 *)
-
PARI
a(n) = sumdiv(n, d, (-1)^(n/d-1)*binomial(d+1, 2));
Formula
G.f.: -Sum_{k>=1} (-x)^k/(1-x^k)^3 = Sum_{k>=1} binomial(k+1,2) * x^k/(1+x^k).