login
Sum of all numbers from tau(n) to sigma(n).
1

%I #15 Nov 20 2020 04:52:53

%S 1,5,9,25,20,72,35,114,88,165,77,391,104,294,294,486,170,765,209,888,

%T 522,660,299,1802,493,897,814,1581,464,2600,527,2001,1170,1479,1170,

%U 4150,740,1824,1590,4067,902,4628,989,3555,3066,2622,1175,7705,1650,4356,2622,4836

%N Sum of all numbers from tau(n) to sigma(n).

%H Antti Karttunen, <a href="/A162907/b162907.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A000005(n) + (A000005(n)+1) + ... + A000203(n) = A000217(A000203(n)) - A000217(A000005(n)-1).

%e From _Antti Karttunen_, Sep 10 2017: (Start)

%e For n=1, tau(1) = sigma(1) = 1, thus a(1) = 1.

%e For n=2, tau(2) = 2 & sigma(2) = 3, thus a(2) = 2 + 3 = 5

%e For n=3, tau(3) = 2 & sigma(3) = 4, thus a(3) = 2 + 3 + 4 = 9.

%e For n=4, tau(4) = 3 & sigma(4) = 7, thus a(4) = 3 + 4 + 5 + 6 + 7 = 25. (End)

%p A000217 := proc(n) n*(n+1) /2; end: A162907 := proc(n) A000217(numtheory[sigma](n)) - A000217(numtheory[tau](n)-1) ; end: seq(A162907(n),n=1..100) ; # _R. J. Mathar_, Jul 21 2009

%p # second Maple program:

%p with(numtheory):

%p a:= n-> ((u, o)-> (u+o)*(o-u+1)/2)(tau(n), sigma(n)):

%p seq(a(n), n=1..80); # _Alois P. Heinz_, Sep 10 2017

%t a[n_] := Range[DivisorSigma[0, n], DivisorSigma[1, n]] // Total;

%t Array[a, 100] (* _Jean-François Alcover_, Nov 20 2020 *)

%o (PARI)

%o A000217(n) = n * (n + 1) / 2;

%o A162907(n) = (A000217(sigma(n)) - A000217(numdiv(n)-1)); \\ _Antti Karttunen_, Sep 10 2017, after the Maple-code.

%Y Cf. A000005, A000203, A000217.

%K nonn

%O 1,2

%A _Juri-Stepan Gerasimov_, Jul 17 2009

%E Approximately half of the entries corrected by _R. J. Mathar_, Jul 21 2009