OFFSET
1,1
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..7099
FORMULA
a(n) = p(n) + n - 1 - pi(p(n)/2), where p(n) = prime(n) and pi(i) = A000720(i).
MAPLE
with(NumberTheory);
A338361 := n -> ithprime(n)+n-1-pi(ithprime(n)/2);
MATHEMATICA
A338361[n_] := Prime[n] - PrimePi[Prime[n]/2] + n - 1;
Array[A338361, 100] (* Paolo Xausa, Jan 30 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 03 2020
STATUS
approved