login
This site is supported by donations 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). 1
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

Muniru A Asiru, Table of n, a(n) for n = 1..2000

FORMULA

a(n) = (prime(n+1)-prime(n))/2-1 = A001223(n)/2-1 for n>=2. - Robert Israel, Jun 01 2016

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

Cf. A000040, A001223, A036263.

Sequence in context: A194305 A036580 A101674 * A038760 A245825 A143946

Adjacent sequences:  A100817 A100818 A100819 * A100821 A100822 A100823

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 12 04:16 EST 2019. Contains 329047 sequences. (Running on oeis4.)