

A132106


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


17



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

Matches first 8 odd primes.


LINKS

Antti Karttunen, Table of n, a(n) for n = 0..16384


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


PROG

(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*(1m)+1)(isqrt(n)) # Chai Wah Wu, Oct 08 2021


CROSSREFS

Cf. A000196, A006218, A161841 (first differences).
Sequence in context: A309203 A176847 A067019 * A242393 A210494 A338483
Adjacent sequences: A132103 A132104 A132105 * A132107 A132108 A132109


KEYWORD

nonn


AUTHOR

Richard C. Schroeppel, Oct 31 2007


STATUS

approved



