A107019 Records in A074928.
1, 2, 6, 8, 14, 24, 30, 32, 58, 60, 68, 70, 84, 102
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
a(n) = { my(m=0, v = prime(n)*prime(n+1)); while (! isprime(v-m), m++;); return (m);} \\ Michel Marcus, Apr 19 2013
The product of the 4th prime number, 7 and the 5th prime, 11, is 77; the smallest prime greater than this is the 22nd prime, 79; therefore the 4th term of the sequence is 22-4 = 18.
f:= n -> numtheory:-pi(ithprime(n)*ithprime(n+1))+1-n: map(f, [$1..100]); # Robert Israel, Mar 21 2017
Table[PrimePi[Prime[n]Prime[n + 1]] - n + 1, {n, 48}] (* Zak Seidov, Aug 21 2006 *)
for(n=1, 100, print1(primepi(prime(n)*prime(n + 1)) - n + 1, ", ")) \\ Indranil Ghosh, Mar 22 2017
from sympy import prime, primepi print([primepi(prime(n)*prime(n + 1)) - n + 1 for n in range(1, 100)]) # Indranil Ghosh, Mar 22 2017
Comments