login
Sum of number of divisors of all positive integers <= prime(n).
1

%I #24 Jul 12 2025 12:30:45

%S 3,5,10,16,29,37,52,60,76,103,113,142,160,170,188,219,249,263,294,314,

%T 328,358,379,413,461,484,494,516,530,554,637,659,697,707,768,782,822,

%U 858,878,919,953,973,1033,1049,1072,1086,1168,1240,1267,1281,1307,1343,1365,1423,1468,1504,1544,1562,1604,1632,1642,1709

%N Sum of number of divisors of all positive integers <= prime(n).

%C a(n) is the index of the first position of prime(n) in A027750, the sequence that lists the divisors of all integers. - _Michel Marcus_, Oct 17 2015

%H Chai Wah Wu, <a href="/A253769/b253769.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A006218(A000040(n)).

%e For n = 3 the third prime number is 5 and the sum of the number of divisors of the first five positive integers is 1 + 2 + 2 + 3 + 2 = 10, so a(3) = 10.

%t Module[{nn=300,d},d=Accumulate[DivisorSigma[0,Range[nn]]];Table[d[[k]],{k,Prime[Range[PrimePi[nn]]]}]] (* _Harvey P. Dale_, Jul 12 2025 *)

%o (PARI) a(n) = sum(i=1, prime(n), numdiv(i)); \\ _Michel Marcus_, Jan 15 2015

%o (Python)

%o from math import isqrt

%o from sympy import prime

%o def A253769(n): return (lambda m, p: 2*sum(p//k for k in range(1, m+1))-m*m)(isqrt(prime(n)),prime(n)) # _Chai Wah Wu_, Oct 09 2021

%Y Cf. A000005, A000040, A006218, A027750, A244576, A244578, A244583.

%Y Partial sums of A139140.

%K nonn

%O 1,1

%A _Omar E. Pol_, Jan 14 2015