OFFSET
1,2
LINKS
L. Manor, Table of n, a(n) for n = 1..1000
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
KEYWORD
easy,nonn
AUTHOR
Lior Manor, Sep 30 2009
STATUS
approved