[go: up one dir, main page]

login
A089368
Least k such that 2*pi(n) = pi(n+k), where pi(n) = number of primes up to n. (The number of primes between 1 to n is the same as the number of primes between n+1 and n+k.)
0
0, 1, 4, 3, 8, 7, 12, 11, 10, 9, 18, 17, 24, 23, 22, 21, 26, 25, 34, 33, 32, 31, 38, 37, 36, 35, 34, 33, 42, 41, 48, 47, 46, 45, 44, 43, 52, 51, 50, 49, 60, 59, 64, 63, 62, 61, 66, 65, 64, 63, 62, 61, 78, 77, 76, 75, 74, 73, 80, 79, 90, 89, 88, 87, 86, 85, 96, 95, 94, 93, 102, 101
OFFSET
1,3
COMMENTS
a(n) + n = prime(2*pi(n)).
EXAMPLE
a(11) = 18 as pi(11) = 5 and pi(11+18) = pi(29) = 10.
MAPLE
with(numtheory): a:=n->ithprime(2*pi(n))-n: 0, seq(a(n), n=2..80); # Emeric Deutsch, Jul 20 2005
CROSSREFS
Sequence in context: A265289 A302258 A132021 * A357130 A116583 A196521
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 08 2003
EXTENSIONS
More terms from Emeric Deutsch, Jul 20 2005
STATUS
approved