login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101597 Number of consecutive composite numbers between balanced primes and their lower or upper prime neighbor. 2
1, 5, 5, 5, 11, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 11, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 11, 5, 5, 5, 11, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 11, 5, 5, 5, 5, 5, 11, 5, 5, 5, 5, 11, 11, 5, 11, 5, 5, 5, 5, 5, 5, 5, 5, 11, 5, 5, 5, 5, 5, 5, 5, 5, 11, 5, 5, 5, 5, 5, 5, 5, 5, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
These numbers are not always prime with 35 occurring for prime(n) n<1000000.
The first 35 occurs at a(947). - Antti Karttunen, Dec 16 2017
LINKS
FORMULA
a(n) = A013632(A006562(n))-1. - Antti Karttunen, Dec 16 2017
EXAMPLE
53 has the 5 consecutive composites 48,49,50,51,52 below it and the 5 consecutive composites 54,55,56,57,58 above it so 5 is in the second position in the table.
MATHEMATICA
Flatten[Differences /@ Select[Partition[Prime@ Range[1900], 3, 1], #2 == Mean@ {#1, #3} & @@ # &][[All, 1 ;; 2]] - 1] (* Michael De Vlieger, Dec 16 2017 *)
PROG
(PARI) betwixtpr(n) = { local(c1, c2, x, y); for(x=2, n, c1=c2=0; for(y=prime(x-1)+1, prime(x)-1, if(!isprime(y), c1++); ); for(y=prime(x)+1, prime(x+1)-1, if(!isprime(y), c2++); ); if(c1==c2, print1(c1", ")) ) }
(PARI) up_to = 10000; n = 0; forprime(p=1, oo, if((d=(p-precprime(p-1)))==(nextprime(p+1)-p), n++; write("b101597.txt", n, " ", d-1); if(n>=up_to, break))); \\ Antti Karttunen, Dec 16 2017
CROSSREFS
Sequence in context: A135089 A127310 A214925 * A119991 A262947 A265821
KEYWORD
nonn
AUTHOR
Cino Hilliard, Jan 26 2005
EXTENSIONS
Offset changed from 2 to 1 by Antti Karttunen, Dec 16 2017
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 17:51 EDT 2024. Contains 371962 sequences. (Running on oeis4.)