login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A132106 a(n) = 1 + floor(sqrt(n)) + Sum_{i=1..n} floor(n/i). 1

%I #20 Oct 08 2021 14:45:26

%S 1,3,5,7,11,13,17,19,23,27,31,33,39,41,45,49,55,57,63,65,71,75,79,81,

%T 89,93,97,101,107,109,117,119,125,129,133,137,147,149,153,157,165,167,

%U 175,177,183,189,193,195,205,209,215,219,225,227,235,239,247,251,255,257,269

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

%C Matches first 8 odd primes.

%H Antti Karttunen, <a href="/A132106/b132106.txt">Table of n, a(n) for n = 0..16384</a>

%F a(n) = 1 + Sum_{i=1..n} A161841(i) for n > 0. - _Christian Krause_, Jun 17 2021

%F a(n) = 1 + A000196(n) + A006218(n). - _Vaclav Kotesovec_, Jul 01 2021

%o (PARI) a(n) = 1 + sqrtint(n) + sum(i=1, n, n\i); \\ _Michel Marcus_, Jun 17 2021

%o (Python)

%o from math import isqrt

%o 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

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

%K nonn

%O 0,2

%A Richard C. Schroeppel, Oct 31 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)