A079248 Sum of q in all pairs (p,q), 0 <= p < q, p+q divides n.
1, 3, 6, 10, 13, 23, 23, 36, 41, 55, 52, 87, 71, 102, 110, 136, 118, 184, 146, 217, 204, 241, 211, 335, 260, 333, 328, 410, 331, 512, 377, 528, 482, 562, 512, 743, 533, 699, 666, 853, 652, 970, 716, 985, 927, 1018, 853, 1311, 948, 1252, 1124, 1367, 1081, 1578
Offset: 1
Examples
There are 7 pairs (p,q), 0 <= p < q, such that p+q divides 6: (0,1), (0,2), (0,3), (0,6), (1, 2), (1, 5), (2, 4); thus a(6) = 1+2+3+6+2+5+4 = 23.
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harvey P. Dale)
Crossrefs
Cf. A143444. - Gary W. Adamson, Aug 15 2008
Programs
-
Mathematica
Table[Total[Select[Subsets[Range[0,n],{2}],Divisible[n,Total[#]]&][[All, 2]]],{n,60}] (* Harvey P. Dale, Oct 06 2019 *)
-
PARI
a(n) = {my(d = divisors(n)); 1 + sum(i = 2, #d, binomial(d[i] + 1, 2) - binomial(d[i]\2 + 1, 2))} \\ David A. Corneth, Oct 06 2019
Formula
Inverse Moebius transform of A001318.
G.f.: Sum_{n>1} x^n*(1+x^n+x^(2*n))/(1-x^n)/(1-x^(2*n))^2.
Comments