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!)
A092494 a(n) = Sum_{p prime and p<=n} ceiling(n/p). 4

%I #11 Jun 19 2019 14:13:06

%S 0,1,3,4,6,7,10,11,12,13,16,17,20,21,23,25,27,28,31,32,34,36,39,40,42,

%T 43,45,46,49,50,54,55,56,58,60,62,65,66,68,70,73,74,78,79,81,83,86,87,

%U 89,90,92,94,97,98,100,102,104,106,109,110,114,115,117,119,120,122

%N a(n) = Sum_{p prime and p<=n} ceiling(n/p).

%C a(n) = A013939(n) + A048865(n).

%H Robert Israel, <a href="/A092494/b092494.txt">Table of n, a(n) for n = 1..10000</a>

%p N:= 100: # for a(1)..a(N)

%p V:= Vector(N):

%p p:= 0:

%p do

%p p:= nextprime(p);

%p if p > N then break fi;

%p V[p]:= V[p]+1;

%p for k from 2 to floor(N/p) do

%p V[(k-1)*p+1 .. k*p]:= V[(k-1)*p+1 .. k*p] +~ k;

%p od;

%p if (k-1)*p+1<=N then V[(k-1)*p+1..N]:= V[(k-1)*p+1..N]+~ k fi

%p od:

%p convert(V,list); # _Robert Israel_, Jun 19 2019

%o (PARI) a(n) = sum(k=1, n, isprime(k)*ceil(n/k)); \\ _Michel Marcus_, Jun 19 2019

%Y Cf. A006590.

%K nonn

%O 1,3

%A _Reinhard Zumkeller_, Apr 05 2004

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 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)