OFFSET
3,1
COMMENTS
The n-th prime appears A102820(n) times. - Flávio V. Fernandes, Apr 08 2021
A080191 lists the distinct terms of this sequence. - Flávio V. Fernandes, Jun 19 2021
FORMULA
EXAMPLE
Prime(3)/2 = 2.5, so a(3) = 2.
MATHEMATICA
u = NextPrime[t, -1] (* A336298 *)
t - u (* A336299 *)
Table[NextPrime[Prime[n]/2, -1], {n, 3, 80}] (* Wesley Ivan Hurt, Nov 26 2020 *)
PROG
(PARI) a(n) = precprime(prime(n)/2); \\ Michel Marcus, Nov 16 2020
(Python)
from sympy import prime, prevprime
def A336298(n):
return prevprime(prime(n)//2+1) # Chai Wah Wu, Nov 26 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Nov 16 2020
STATUS
approved