cp's OEIS Frontend

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.

A167511 The count of isolated primes between n-th non-isolated nonprime and n-th isolated nonprime.

This page as a plain text file.
%I A167511 #6 Mar 30 2012 18:52:35
%S A167511 1,1,0,0,1,2,4,5,9,9,12,11,15,15,15,17,18,21,22,24,27,36,36,40,47,51,
%T A167511 54,55,56,58,76,76,75,77,79,96,96,97,97,99,105,114,116,117,118,119,
%U A167511 127,130,132,132,146,147,151,151,152,159,166,166,169,169,173,176,180,180,181
%N A167511 The count of isolated primes between n-th non-isolated nonprime and n-th isolated nonprime.
%F A167511 a(n) = #{ A007510(i): A164276(n) < A007510(i) < A014574(n)}. [From _R. J. Mathar_, Mar 18 2010]
%F A167511 a(n) = SUM{A010051(k)*(1-A164292(k)): A164276(n)<=k<=A014574(n)}. [From _Reinhard Zumkeller_, Apr 02 2010]
%e A167511 a(1)=1 (0<2<4); a(2)=1 (1<2<6); a(3)=0 (8<no<12); a(4)=0 (9<no<18); a(5)=1 ( 10<23<30); a(5)=2 (14<23&37<42); a(5)=4 (15<23&37&47&53<60).
%p A167511 Contribution from _R. J. Mathar_, Mar 18 2010: (Start)
%p A167511 isA007510 := proc(n) isprime(n) and not isprime(n+2) and not isprime(n-2) ; end proc:
%p A167511 isA001359 := proc(n) isprime(n) and isprime(n+2) ; end proc:
%p A167511 A001359 := proc(n) if n = 1 then 3 ; else for a from procname(n-1)+2 do if isA001359(a) then return a; end if; end do: end if: end proc:
%p A167511 isA164276 := proc(n) not isprime(n) and (not isprime(n-1) or not isprime(n+1)) ; end proc:
%p A167511 A164276 := proc(n) if n = 1 then 0; else for a from procname(n-1)+1 do if isA164276(a) then return a; end if; end do: end if: end proc:
%p A167511 A014574 := proc(n) A001359(n)+1 ; end proc:
%p A167511 A167511 := proc(n) a := 0 ; for i from A164276(n)+1 to A014574(n)-1 do if isA007510(i) then a :=a +1 ; end if; end do; a ; end proc:
%p A167511 seq(A167511(n),n=1..80) ; (End)
%Y A167511 Cf. A007510, A014574, A164276.
%K A167511 nonn
%O A167511 1,6
%A A167511 _Juri-Stepan Gerasimov_, Nov 05 2009
%E A167511 a(12), a(31) and a(32) corrected by _R. J. Mathar_, Mar 18 2010