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.

A132106 a(n) = 1 + floor(sqrt(n)) + Sum_{i=1..n} floor(n/i).

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 17, 19, 23, 27, 31, 33, 39, 41, 45, 49, 55, 57, 63, 65, 71, 75, 79, 81, 89, 93, 97, 101, 107, 109, 117, 119, 125, 129, 133, 137, 147, 149, 153, 157, 165, 167, 175, 177, 183, 189, 193, 195, 205, 209, 215, 219, 225, 227, 235, 239, 247, 251, 255, 257, 269
Offset: 0

Views

Author

Richard C. Schroeppel, Oct 31 2007

Keywords

Comments

Matches first 8 odd primes.

Crossrefs

Cf. A000196, A006218, A161841 (first differences).

Programs

  • Mathematica
    a[n_]:=1+2Sum[Ceiling[DivisorSigma[0,k]/2],{k,n-1}]; Array[a,61] (* Stefano Spezia, Jan 06 2025 *)
  • PARI
    a(n) = 1 + sqrtint(n) + sum(i=1, n, n\i); \\ Michel Marcus, Jun 17 2021
    
  • Python
    from math import isqrt
    def A132106(n): return (lambda m: 2*(sum(n//k for k in range(1, m+1)))+m*(1-m)+1)(isqrt(n)) # Chai Wah Wu, Oct 08 2021

Formula

a(n) = 1 + Sum_{i=1..n} A161841(i) for n > 0. - Christian Krause, Jun 17 2021
a(n) = 1 + A000196(n) + A006218(n). - Vaclav Kotesovec, Jul 01 2021