login
A331677
a(n) is the difference between the number of primes smaller than prime(n) (i.e., n-1) and greater than prime(n) but less than 2*prime(n).
1
-1, 0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 2, 3, 4, 5, 4, 3, 5, 5, 5, 7, 6, 7, 7, 5, 5, 7, 8, 10, 11, 7, 8, 7, 8, 7, 9, 8, 9, 10, 11, 10, 11, 10, 11, 12, 13, 11, 9, 10, 11, 11, 12, 13, 12, 12, 12, 14, 15, 16, 17, 18, 17, 13, 13, 15, 16, 12, 13, 12, 14, 15, 16, 15, 15
OFFSET
1,6
FORMULA
a(n) = (2*n-1) - A020900(n). - Michel Marcus, Feb 02 2020
a(n) = n - 1 - A070046(n). - M. F. Hasler, Feb 29 2020
a(n) = A334051(n) - 1. - Alois P. Heinz, Oct 09 2020
PROG
(PARI) a(n) = 2*n - 1 - primepi(2*prime(n)); \\ Michel Marcus, Feb 02 2020
CROSSREFS
KEYWORD
sign
AUTHOR
Todor Szimeonov, Jan 24 2020
STATUS
approved