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.

A085831 a(n) = Sum_{k=1..2^n} d(k) where d(n) = number of divisors of n (A000005).

Original entry on oeis.org

1, 3, 8, 20, 50, 119, 280, 645, 1466, 3280, 7262, 15937, 34720, 75108, 161552, 345785, 736974, 1564762, 3311206, 6985780, 14698342, 30850276, 64607782, 135030018, 281689074, 586636098, 1219788256, 2532608855, 5251282902, 10874696106, 22493653324, 46475828418
Offset: 0

Views

Author

Robert G. Wilson v, Sep 21 2000

Keywords

Crossrefs

Programs

  • Mathematica
    k = s = 0; Do[ While[ k < 2^n, k++; s = s + DivisorSigma[ 0, k ]]; Print[s], {n, 0, 29} ]
  • PARI
    a(n) = sum(k=1, 2^n, numdiv(k)); \\ Michel Marcus, Oct 10 2021
  • Python
    from math import isqrt
    def A085831(n): return (lambda m, r: 2*sum(r//k for k in range(1, m+1))-m*m)(isqrt(2**n),2**n) # Chai Wah Wu, Oct 08 2021