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!)
A322068 a(n) = (1/2)*Sum_{p prime <= n} floor(n/p) * floor(1 + n/p). 2
0, 0, 1, 2, 4, 5, 10, 11, 15, 18, 25, 26, 36, 37, 46, 54, 62, 63, 78, 79, 93, 103, 116, 117, 137, 142, 157, 166, 184, 185, 216, 217, 233, 247, 266, 278, 308, 309, 330, 346, 374, 375, 416, 417, 443, 467, 492, 493, 533, 540, 575, 595, 625, 626, 671, 687, 723, 745 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Partial sums of A069359.
LINKS
FORMULA
a(n) ~ A085548 * n*(n+1)/2.
a(n) = Sum_{p prime <= n} A000217(floor(n/p)).
a(n) = (Sum_{k=1..floor(sqrt(n))} k*(k+1) * (pi(floor(n/k)) - pi(floor(n/(k+1)))) + Sum_{p prime <= floor(n/(1+floor(sqrt(n))))} floor(n/p)*floor(1+n/p))/2, where pi(x) is the prime-counting function (A000720).
a(n) = Sum_{i=1..n} i*pi(floor(n/i)), where pi(n) = A000720(n). - Ridouane Oudra, Oct 16 2019
MAPLE
with(numtheory): seq(add(i*pi(floor(n/i)), i=1..n), n=0..60); # Ridouane Oudra, Oct 16 2019
MATHEMATICA
a[n_] := Module[{s=0, p=2}, While[p<=n, s += (Floor[n/p] * Floor[1 + n/p]); p=NextPrime[p]]; s]/2; Array[a, 100, 0] (* Amiram Eldar, Nov 25 2018 *)
PROG
(PARI) a(n) = my(s=0); forprime(p=2, n, s+=(n\p)*(1+n\p)); s/2;
(PARI) a(n) = sum(k=1, sqrtint(n), k*(k+1) * (primepi(n\k) - primepi(n\(k+1))))/2 + sum(k=1, n\(sqrtint(n)+1), if(isprime(k), (n\k)*(1+n\k), 0))/2;
CROSSREFS
Sequence in context: A236246 A004792 A167795 * A138048 A057762 A109511
KEYWORD
nonn,easy
AUTHOR
Daniel Suteu, Nov 25 2018
STATUS
approved

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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)