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!)
A140828 a(0)=1, a(n) = ceiling(prime(n)/a(n-1)), where prime(n) is the n-th prime. 2

%I #23 Apr 08 2023 11:17:54

%S 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,

%T 11,12,11,13,11,14,11,15,11,16,11,17,11,18,11,18,12,18,13,18,13,18,14,

%U 18,14,19,14,20,14,20,15,19,16,20,16,20,16,21,17,21,17,21,18,21,18,22,18

%N a(0)=1, a(n) = ceiling(prime(n)/a(n-1)), where prime(n) is the n-th prime.

%C 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

%H John Tyler Rascoe, <a href="/A140828/b140828.txt">Table of n, a(n) for n = 0..10000</a>

%t a = {1}; For[n = 1, n < 80, n++, AppendTo[a, Ceiling[Prime[n]/a[[n]]]]]; a (* _Stefan Steinerberger_, Aug 28 2008 *)

%o (Python)

%o from math import ceil

%o from sympy import prime

%o def A140828_list(nmax):

%o A = [1]

%o for n in range(1,nmax+1):

%o A.append(ceil(prime(n)/A[-1]))

%o return A # _John Tyler Rascoe_, Apr 07 2023

%o (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

%Y Cf. A140829 (similar sequence).

%Y Cf. A031368.

%K nonn

%O 0,2

%A _Leroy Quet_, Jul 18 2008

%E More terms from _Stefan Steinerberger_, Aug 28 2008

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 26 04:03 EDT 2024. Contains 371989 sequences. (Running on oeis4.)