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!)
A165906 Sum of first n primes divided by the n-th prime, rounded up to the nearest integer. 2
1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 9, 10, 11, 11, 11, 11, 12, 13, 13, 14, 15, 14, 15, 15, 16, 16, 17, 17, 17, 18, 18, 19, 20, 20, 20, 21, 22, 22, 21, 22, 23, 23, 24, 25, 25, 25, 26, 26, 27, 27, 28, 29, 29, 28, 29, 30, 31, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = ceiling(Sum_{j=1..n} prime(j)) / prime(n).
EXAMPLE
a(4) = ceiling((2 + 3 + 5 + 7)/7) = ceiling(17/7) = 3.
MATHEMATICA
Module[{nn=80, pr}, pr=Prime[Range[nn]]; Ceiling[#[[2]]/#[[1]]]&/@ Thread[ {pr, Accumulate[pr]}]] (* Harvey P. Dale, Jan 29 2013 *)
PROG
(PARI) a(n) = ceil(sum(k=1, n, prime(k))/prime(n)); \\ Michel Marcus, Mar 21 2018
(PARI) first(n) = my(res = vector(n), p, s, i = 0); forprime(p = 2, , s += p; i++; res[i] = ceil(s / p); if(i==n, return(res)); \\ David A. Corneth, Mar 24 2018
CROSSREFS
Sequence in context: A336348 A177357 A320297 * A165907 A104103 A194964
KEYWORD
easy,nonn
AUTHOR
Lior Manor, Sep 30 2009
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 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)