A104037 Numbers of primes between two sexy primes.
1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Sexy Primes. [The definition in this webpage is unsatisfactory, because it defines a "sexy prime" as a pair of primes.- _N. J. A. Sloane_, Mar 07 2021].
Programs
-
Maple
p:=1: q:= 0: r:= 1: s:= 1: count:= 0: Res:= NULL: while count < 100 do t:= charfcn[{true}](isprime(p+6)); if t=1 and q=1 then count:= count + 1; Res:= Res, r+s; fi; p:= p+2; q:= r; r:= s; s:= t; od: Res; # Robert Israel, Jun 23 2019
Extensions
Corrected and extended by Robert Israel, Jun 23 2019