login
Sum of q in all pairs (p,q), 0 <= p < q, p+q divides n.
2

%I #20 Oct 07 2019 02:28:19

%S 1,3,6,10,13,23,23,36,41,55,52,87,71,102,110,136,118,184,146,217,204,

%T 241,211,335,260,333,328,410,331,512,377,528,482,562,512,743,533,699,

%U 666,853,652,970,716,985,927,1018,853,1311,948,1252,1124,1367,1081,1578

%N Sum of q in all pairs (p,q), 0 <= p < q, p+q divides n.

%C Equals row sums of triangle A143444 (the inverse Mobius transform of a diagonalized matrix of A001318). - _Gary W. Adamson_, Aug 15 2008

%H David A. Corneth, <a href="/A079248/b079248.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Harvey P. Dale)

%F Inverse Moebius transform of A001318.

%F G.f.: Sum_{n>1} x^n*(1+x^n+x^(2*n))/(1-x^n)/(1-x^(2*n))^2.

%e 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.

%t Table[Total[Select[Subsets[Range[0,n],{2}],Divisible[n,Total[#]]&][[All, 2]]],{n,60}] (* _Harvey P. Dale_, Oct 06 2019 *)

%o (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

%Y Cf. A143444. - _Gary W. Adamson_, Aug 15 2008

%K nonn,easy

%O 1,2

%A _Vladeta Jovovic_, Feb 03 2003