cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A139140 For n>=1, a(n) = d(prime(n)+1) + d(prime(n)+2) + d(prime(n)+3) + ... + d(prime(n+1)), where d(m) is the number of positive divisors of m and prime(n) is the n-th prime. a(0) = d(1) + d(2).

This page as a plain text file.
%I A139140 #23 Feb 26 2025 06:34:22
%S A139140 3,2,5,6,13,8,15,8,16,27,10,29,18,10,18,31,30,14,31,20,14,30,21,34,48,
%T A139140 23,10,22,14,24,83,22,38,10,61,14,40,36,20,41,34,20,60,16,23,14,82,72,
%U A139140 27,14,26,36,22,58,45,36,40,18,42,28,10,67,98,26,18,24,101,42,64,14,34
%N A139140 For n>=1, a(n) = d(prime(n)+1) + d(prime(n)+2) + d(prime(n)+3) + ... + d(prime(n+1)), where d(m) is the number of positive divisors of m and prime(n) is the n-th prime. a(0) = d(1) + d(2).
%H A139140 John Tyler Rascoe, <a href="/A139140/b139140.txt">Table of n, a(n) for n = 0..10000</a>
%F A139140 For n>=1, a(n) = Sum_{k=1..prime(n+1)} (floor(prime(n+1)/k) - floor(prime(n)/k)), where p(n) is the n-th prime.
%F A139140 a(n) = A006218(A000040(n+1)) - A006218(A000040(n)), n>0. - _R. J. Mathar_, Apr 16 2008
%e A139140 The 9th prime is 23 and the 10th prime is 29. So a(9) = d(24) + d(25) + d(26) + d(27) + d(28) + d(29) = 8 + 3 + 4 + 4 + 6 + 2 = 27.
%p A139140 A000005 := proc(n) numtheory[tau](n) ; end: A006218 := proc(n) local k ; add(A000005(k),k=1..n) ; end: A139140 := proc(n) if n = 0 then RETURN(3) ; else A006218( ithprime(n+1))-A006218(ithprime(n)) ; fi ; end: seq(A139140(n),n=0..100) ; # _R. J. Mathar_, Apr 16 2008
%t A139140 nn=80;Join[{3},With[{nds=Table[DivisorSigma[0,n],{n,Prime[nn+1]}]}, Table[ Total[Take[nds,{Prime[n]+1,Prime[n+1]}]],{n,nn}]]] (* _Harvey P. Dale_, May 07 2012 *)
%o A139140 (Python)
%o A139140 from sympy import divisor_count, prime
%o A139140 def A139140(n): return sum(divisor_count(k) for k in range(prime(n)+1,prime(n+1)+1)) if n else 3 # _Chai Wah Wu_, Oct 23 2023
%Y A139140 Cf. A139141.
%K A139140 nonn
%O A139140 0,1
%A A139140 _Leroy Quet_, Apr 10 2008
%E A139140 More terms from _R. J. Mathar_, Apr 16 2008