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.

A322068 a(n) = (1/2)*Sum_{p prime <= n} floor(n/p) * floor(1 + n/p).

Original entry on oeis.org

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
Offset: 0

Views

Author

Daniel Suteu, Nov 25 2018

Keywords

Comments

Partial sums of A069359.

Crossrefs

Programs

  • 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 *)
  • 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;

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