The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A100820 Number of odd numbers between prime(n) and prime(n+1). 2
0, 0, 0, 1, 0, 1, 0, 1, 2, 0, 2, 1, 0, 1, 2, 2, 0, 2, 1, 0, 2, 1, 2, 3, 1, 0, 1, 0, 1, 6, 1, 2, 0, 4, 0, 2, 2, 1, 2, 2, 0, 4, 0, 1, 0, 5, 5, 1, 0, 1, 2, 0, 4, 2, 2, 2, 0, 2, 1, 0, 4, 6, 1, 0, 1, 6, 2, 4, 0, 1, 2, 3, 2, 2, 1, 2, 3, 1, 3, 4, 0, 4, 0, 2, 1, 2, 3, 1, 0, 1, 5, 3, 1, 3, 1, 2, 5, 0, 8, 2, 4, 2, 2, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,9
LINKS
FORMULA
a(n) = (prime(n+1)-prime(n))/2-1 = A001223(n)/2-1 for n>=2. - Robert Israel, Jun 01 2016
a(n) = A028334(n) - 1 for n>=2. - Michel Marcus, Jan 04 2023
EXAMPLE
a(2)=0 because between 3 and 5 there are no odd numbers.
a(3)=0 because between 5 and 7 there are no odd numbers.
MAPLE
P:= select(isprime, [seq(i, i=3..1000, 2)]):
0, op(map(`-`, 1/2*(P[2..-1]-P[1..-2]), 1)); # Robert Israel, Jun 01 2016
MATHEMATICA
Table[Floor[Max[(Prime[n + 1] - Prime[n])/2 - 1, 0] ], {n, 120}] (* Ray Chandler, Jan 09 2005 *)
PROG
(Magma) [0] cat [(NthPrime(n+1)-NthPrime(n))/2-1 : n in [2..100]]; // Wesley Ivan Hurt, Jun 01 2016
CROSSREFS
Sequence in context: A194305 A036580 A101674 * A038760 A337938 A245825
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, Jan 06 2005
EXTENSIONS
Corrected and extended by Ray Chandler, Jan 09 2005
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 June 8 05:45 EDT 2024. Contains 373207 sequences. (Running on oeis4.)