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.

Original entry on oeis.org

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, 54, 55, 56, 58, 76, 76, 75, 77, 79, 96, 96, 97, 97, 99, 105, 114, 116, 117, 118, 119, 127, 130, 132, 132, 146, 147, 151, 151, 152, 159, 166, 166, 169, 169, 173, 176, 180, 180, 181
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 05 2009

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    Contribution from R. J. Mathar, Mar 18 2010: (Start)
    isA007510 := proc(n) isprime(n) and not isprime(n+2) and not isprime(n-2) ; end proc:
    isA001359 := proc(n) isprime(n) and isprime(n+2) ; end proc:
    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:
    isA164276 := proc(n) not isprime(n) and (not isprime(n-1) or not isprime(n+1)) ; end proc:
    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:
    A014574 := proc(n) A001359(n)+1 ; end proc:
    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:
    seq(A167511(n),n=1..80) ; (End)

Formula

a(n) = #{ A007510(i): A164276(n) < A007510(i) < A014574(n)}. [From R. J. Mathar, Mar 18 2010]
a(n) = SUM{A010051(k)*(1-A164292(k)): A164276(n)<=k<=A014574(n)}. [From Reinhard Zumkeller, Apr 02 2010]

Extensions

a(12), a(31) and a(32) corrected by R. J. Mathar, Mar 18 2010