|
|
A101288
|
|
The number of primes between the n-th isolated prime and n-th 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;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Instead of "isolated" one speaks also of "single" primes, they are listed in A007510 and include 2 by convention. By isolated composites are meant composites whose two neighbors both are prime, i.e., the averages of twin primes, A014574. - M. F. Hasler, Aug 11 2015
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = 1 = # { 3 }, the only prime between 2 (the first "isolated prime" according to A007510) and 4, the first "isolated composite" in the sense that x-1 and x+1 both are primes.
a(2) = 5 = # { 7, 11, 13, 17, 19 }, the primes between the second isolated prime, 23, and second isolated composite, 6.
a(3) = 6 = # { 31, 29, 23, 19, 17, 13 }, the primes between A007510(3) = 37 and A014574(3) = 12.
|
|
MAPLE
|
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:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|