login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Greatest prime < prime(n)/2.
2

%I #48 Jun 05 2023 01:13:30

%S 2,3,5,5,7,7,11,13,13,17,19,19,23,23,29,29,31,31,31,37,41,43,47,47,47,

%T 53,53,53,61,61,67,67,73,73,73,79,83,83,89,89,89,89,97,97,103,109,113,

%U 113,113,113,113,113,127,131,131,131,137,139,139,139,151,151

%N Greatest prime < prime(n)/2.

%C The n-th prime appears A102820(n) times. - _Flávio V. Fernandes_, Apr 08 2021

%C A080191 lists the distinct terms of this sequence. - _Flávio V. Fernandes_, Jun 19 2021

%F a(n) = A151799(A000040(n)/2) for n >= 3. - _Wesley Ivan Hurt_, Nov 26 2020

%e Prime(3)/2 = 2.5, so a(3) = 2.

%t z = 120; t = Table[NextPrime[Prime[n]/2], {n, 3, z}]; (* A039734, A079953 *)

%t u = NextPrime[t, -1] (* A336298 *)

%t t - u (* A336299 *)

%t Table[NextPrime[Prime[n]/2, -1], {n, 3, 80}] (* _Wesley Ivan Hurt_, Nov 26 2020 *)

%o (PARI) a(n) = precprime(prime(n)/2); \\ _Michel Marcus_, Nov 16 2020

%o (Python)

%o from sympy import prime, prevprime

%o def A336298(n):

%o return prevprime(prime(n)//2+1) # _Chai Wah Wu_, Nov 26 2020

%Y Cf. A000040, A039734, A336299.

%K nonn

%O 3,1

%A _Clark Kimberling_, Nov 16 2020