This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A176704 Number of twin primes between non-twin prime(n) and non-twin prime(n+1). 1

%I

%S 7,2,2,0,2,2,0,0,0,4,0,0,4,0,0,0,6,0,2,2,0,0,2,2,0,2,0,0,2,0,0,0,0,0,

%T 0,0,0,0,4,0,0,0,2,0,0,0,0,0,0,2,0,0,0,2,0,0,2,0,2,2,0,2,0,0,0,0,0,0,

%U 0,0,0,0,0,0,0,0,0,0,0,6,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,2,0

%N Number of twin primes between non-twin prime(n) and non-twin prime(n+1).

%e a(1)=7 because are 7 twin primes (3,5,7,11,13,17,19) between non-twin prime(1)=2 and non-twin prime(2)=23.

%p From _R. J. Mathar_, Apr 27 2010: (Start)

%p isA001097 := proc(n) isprime(n) and ( isprime(n+2) or isprime(n-2) ); end proc:

%p A001097 := proc(n) option remember; if n =1 then 3; else for a from procname(n-1)+2 by 2 do if isA001097(a) then return a; end if; end do: end if; end proc:

%p A007510 := proc(n) option remember; if n <= 2 then op(n,[2,23]) ; else for a from procname(n-1)+2 by 2 do if isprime(a) and not isprime(a+2) and not isprime(a-2) then return a; end if; end do: end if; end proc:

%p A176704 := proc(n) local a,p ; a := 0 ; for p from A007510(n)+1 to A007510(n+1)-1 do if isA001097(p) then a := a+1 ; end if; end do: return a; end proc:

%p seq(A176704(n),n=1..120) ; (End)

%Y Cf. A001097, A007510.

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Apr 24 2010

%E Corrected (a(21)=4 removed) by _R. J. Mathar_, Apr 27 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 15 09:22 EDT 2019. Contains 328026 sequences. (Running on oeis4.)