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!)
A156745 a(n) = Sum_{k=1..n} floor((n+k)/k) = n + Sum_{k=1..n} sigma_0(k), where sigma_0(k) is A000005(k). Also a(n) = n + A006218(n). 3

%I #26 Oct 23 2023 17:58:35

%S 2,5,8,12,15,20,23,28,32,37,40,47,50,55,60,66,69,76,79,86,91,96,99,

%T 108,112,117,122,129,132,141,144,151,156,161,166,176,179,184,189,198,

%U 201,210,213,220,227,232,235,246,250,257,262,269,272,281,286,295,300

%N a(n) = Sum_{k=1..n} floor((n+k)/k) = n + Sum_{k=1..n} sigma_0(k), where sigma_0(k) is A000005(k). Also a(n) = n + A006218(n).

%C Generalized sequence b(n) = Sum_{k=1..n} floor((n+k*t)/k) = t*n + Sum_{k=1..n} sigma_0(k), where sigma_0(k) is A000005(k). Also b(n) = t*n + A006218(n).

%C Partial sums of A334954. - _Omar E. Pol_, Sep 26 2020

%F a(n) = 2*n + Sum_{k=1..floor(n/2)} floor((n-k)/k). - _Wesley Ivan Hurt_, Dec 25 2020

%F a(n) = A005843(n) + A002541(n), after _Wesley Ivan Hurt_. - _Omar E. Pol_, Dec 25 2020

%o (PARI) a(n) = n + sum(k=1, n, numdiv(k)); \\ _Michel Marcus_, Oct 02 2020

%o (Python)

%o from math import isqrt

%o def A156745(n): return n-(s:=isqrt(n))**2+(sum(n//k for k in range(1,s+1))<<1) # _Chai Wah Wu_, Oct 23 2023

%Y Cf. A000005, A006218, A153818, A118014, A002541, A334954.

%K easy,nonn

%O 1,1

%A _Ctibor O. Zizka_, Feb 14 2009

%E More terms from _Eric M. Schmidt_, Feb 28 2014

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 July 25 16:17 EDT 2024. Contains 374612 sequences. (Running on oeis4.)