OFFSET
1,2
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
MATHEMATICA
g[n_] := n + PrimePi[n] - PrimePi[n/2];
a[n_] := Which[PrimeQ[n], g[n]-1, PrimeQ[n/2], g[n/2], True, g[n]];
Table[a[n], {n, 1, 128}] (* Jean-François Alcover, Apr 04 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 03 2020
STATUS
approved