OFFSET
1,4
COMMENTS
Previous name: Number of primes p such that prime(n) mod 2*p < prime(n).
Same as A055930, except for a(2). [Noticed by R. J. Mathar, Dec 15 2008, proved by Andrey Zabolotskiy, Oct 26 2017]
FORMULA
A079950(n, a(n) + 1) = prime(n).
Where defined, that is for n > 2, prime(a(n)) = A055377(prime(n)). - Peter Munn, Sep 18 2017
EXAMPLE
n = 6: prime(6) = 13 and 2, 3, 5 are less than 13/2, therefore a(6) = 3.
MATHEMATICA
Table[PrimePi[Prime[n]/2], {n, 75}] (* Michael De Vlieger, Sep 20 2017 *)
PROG
(PARI) a(n) = primepi(prime(n)/2); \\ Michel Marcus, Sep 20 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 19 2003
EXTENSIONS
New name from Peter Munn, Sep 18 2017
STATUS
approved