|
|
A336298
|
|
Greatest prime < prime(n)/2.
|
|
2
|
|
|
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, 53, 53, 53, 61, 61, 67, 67, 73, 73, 73, 79, 83, 83, 89, 89, 89, 89, 97, 97, 103, 109, 113, 113, 113, 113, 113, 113, 127, 131, 131, 131, 137, 139, 139, 139, 151, 151
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
3,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
Prime(3)/2 = 2.5, so a(3) = 2.
|
|
MATHEMATICA
|
z = 120; t = Table[NextPrime[Prime[n]/2], {n, 3, z}]; (* A039734, A079953 *)
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
return prevprime(prime(n)//2+1) # Chai Wah Wu, Nov 26 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|