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.)

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.)

Terms

    a(0) =0a(1) =1a(2) =4a(3) =3a(4) =8a(5) =7a(6) =12a(7) =11a(8) =10a(9) =9a(10) =18a(11) =17a(12) =24a(13) =23a(14) =22a(15) =21a(16) =26a(17) =25a(18) =34a(19) =33a(20) =32a(21) =31a(22) =38a(23) =37a(24) =36a(25) =35a(26) =34a(27) =33a(28) =42a(29) =41

External references