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.
%I A139141 #17 Sep 27 2024 05:44:53 %S A139141 1,2,2,3,3,4,3,4,4,4,5,4,4,5,4,5,5,7,5,5,7,5,5,5,6,5,5,5,7,6,5,5,6,5, %T A139141 6,7,6,6,5,6,5,10,6,8,5,7,6,6,6,7,6,6,11,5,7,6,6,9,7,7,5,6,7,6,9,6,7, %U A139141 7,6,7,8,5,7,7,7,5,7,8,7,7,6,13,6,11,6,8,6,7,6,9,6,7,8,6,7,5,8,7,7,7,7,6,8 %N A139141 For n>=1, a(n) = floor((d(p(n)+1) + d(p(n)+2) + d(p(n)+3) + ... +d(p(n+1)))/(p(n+1) - p(n))), where d(m) is the number of positive divisors of m and p(n) is the n-th prime. a(0) = floor((d(1) + d(2))/2). %C A139141 The sequence approximates the average number of divisors over all integers between consecutive primes. %F A139141 For n>= 1, a(n) = floor(A139140(n)/A001223(n)). %e A139141 The 9th prime is 23 and the 10th prime is 29. So a(9) = floor((d(24) + d(25) + d(26) + d(27) + d(28) + d(29))/6) = floor((8 + 3 + 4 + 4 + 6 + 2)/6) = floor(27/6) = 4. %p A139141 A139141 := proc(n) if n = 0 then 1; else add(numtheory[tau](k),k=ithprime(n)+1..ithprime(n+1)) ; floor(%/(ithprime(n+1)-ithprime(n))) ; fi; end proc: seq(A139141(n),n=0..120) ; # _R. J. Mathar_, Oct 24 2009 %Y A139141 Cf. A001223, A139140. %K A139141 nonn %O A139141 0,2 %A A139141 _Leroy Quet_, Apr 10 2008 %E A139141 Extended beyond a(11) by _R. J. Mathar_, Oct 24 2009