login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101288 The number of primes between the n-th single or isolated prime and n-th single or isolated composite. 1
1, 5, 6, 7, 5, 5, 4, 2, 2, 3, 3, 4, 9, 6, 7, 10, 12, 10, 12, 13, 15, 26, 27, 30, 36, 41, 43, 46, 48, 49, 68, 69, 70, 73, 76, 94, 95, 97, 98, 97, 104, 114, 118, 118, 120, 122, 131, 135, 138, 139, 153, 155, 160, 162, 162, 170, 178, 177, 182, 181, 184, 188, 191, 192, 194 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

EXAMPLE

a(1)=1 (2<3<4); a(2)=5 (23>19&17&13&11&7>6); a(3)=6 (37>31&29&23&19&17&13>12).

MAPLE

Contribution from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 25 2010: (Start)

A007510 := proc(n) if n = 1 then 2; else for a from procname(n-1)+1 do if isA007510(a) then return a; end if; end do; end if; end proc:

isA007510 := proc(n) isprime(n) and not isprime(n+2) and not isprime(n-2) ; simplify(%) ; end proc:

A101288 := proc(n) if n = 1 then return 1 ; end if; a7510 := A007510(n) ; a4574 := A014574(n) ; if a7510 > a4574 then numtheory[pi](a7510-1)-numtheory[pi](a4574) ; else numtheory[pi](a4574)-numtheory[pi](a7510+1) ; end if; end proc:

seq(A101288(n), n=1..120) ; (End)

CROSSREFS

Cf. A000040, A007510, A014574.

Sequence in context: A030178 A038458 A021642 * A095942 A139395 A029911

Adjacent sequences:  A101285 A101286 A101287 * A101289 A101290 A101291

KEYWORD

nonn

AUTHOR

Juri-Stepan Gerasimov (2stepan(AT)rambler.ru), Nov 02 2009

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 25 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 17:11 EST 2012. Contains 205938 sequences.