login
A140828
a(0)=1, a(n) = ceiling(prime(n)/a(n-1)), where prime(n) is the n-th prime.
2
1, 2, 2, 3, 3, 4, 4, 5, 4, 6, 5, 7, 6, 7, 7, 7, 8, 8, 8, 9, 8, 10, 8, 11, 9, 11, 10, 11, 10, 11, 11, 12, 11, 13, 11, 14, 11, 15, 11, 16, 11, 17, 11, 18, 11, 18, 12, 18, 13, 18, 13, 18, 14, 18, 14, 19, 14, 20, 14, 20, 15, 19, 16, 20, 16, 20, 16, 21, 17, 21, 17, 21, 18, 21, 18, 22, 18
OFFSET
0,2
COMMENTS
With floor instead of ceiling, we get 1, 2, 1, 5, 1, 11, 1, 17, 1, 23, ..., which is A031368 interspersed with 1's. - Michel Marcus, Apr 08 2023
LINKS
MATHEMATICA
a = {1}; For[n = 1, n < 80, n++, AppendTo[a, Ceiling[Prime[n]/a[[n]]]]]; a (* Stefan Steinerberger, Aug 28 2008 *)
PROG
(Python)
from math import ceil
from sympy import prime
def A140828_list(nmax):
A = [1]
for n in range(1, nmax+1):
A.append(ceil(prime(n)/A[-1]))
return A # John Tyler Rascoe, Apr 07 2023
(PARI) lista(nn) = my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = ceil(prime(n-1)/va[n-1]); ); va; \\ Michel Marcus, Apr 08 2023
CROSSREFS
Cf. A140829 (similar sequence).
Cf. A031368.
Sequence in context: A137791 A351834 A096125 * A262907 A341721 A290323
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 18 2008
EXTENSIONS
More terms from Stefan Steinerberger, Aug 28 2008
STATUS
approved