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.

Showing 1-2 of 2 results.

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).

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

Leroy Quet, Apr 10 2008

Keywords

Comments

The sequence approximates the average number of divisors over all integers between consecutive primes.

Examples

			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.
		

Crossrefs

Programs

  • Maple
    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

Formula

For n>= 1, a(n) = floor(A139140(n)/A001223(n)).

Extensions

Extended beyond a(11) by R. J. Mathar, Oct 24 2009

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

Original entry on oeis.org

3, 5, 10, 16, 29, 37, 52, 60, 76, 103, 113, 142, 160, 170, 188, 219, 249, 263, 294, 314, 328, 358, 379, 413, 461, 484, 494, 516, 530, 554, 637, 659, 697, 707, 768, 782, 822, 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
Offset: 1

Views

Author

Omar E. Pol, Jan 14 2015

Keywords

Comments

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

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=300,d},d=Accumulate[DivisorSigma[0,Range[nn]]];Table[d[[k]],{k,Prime[Range[PrimePi[nn]]]}]] (* Harvey P. Dale, Jul 12 2025 *)
  • PARI
    a(n) = sum(i=1, prime(n), numdiv(i)); \\ Michel Marcus, Jan 15 2015
    
  • Python
    from math import isqrt
    from sympy import prime
    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

Formula

a(n) = A006218(A000040(n)).
Showing 1-2 of 2 results.