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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A107599 a(n) = 0,1,2 (resp.) if (1/2)[prime(n-1)+prime(n+1)] is less than, equal to or greater than prime(n) (resp.). 0
2, 1, 2, 0, 2, 0, 2, 2, 0, 2, 0, 0, 2, 2, 1, 0, 2, 0, 0, 2, 0, 2, 2, 0, 0, 2, 0, 2, 2, 0, 2, 0, 2, 0, 2, 1, 0, 2, 1, 0, 2, 0, 2, 0, 2, 1, 0, 0, 2, 2, 0, 2, 0, 1, 1, 0, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 2, 0, 2, 2, 2, 0, 1, 0, 2, 2, 0, 2, 2, 0, 2, 0, 2, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 0, 2, 2, 0, 2, 0 (list; graph; refs; listen; history; internal format)
OFFSET

2,1

EXAMPLE

Prime[100]=541, (Prime[100 - 1] + Prime[100 + 1])/2=(523+547)/2=535<541, hence a(100)=0.

MATHEMATICA

Table[If[(Prime[n-1]+Prime[n+1])/2<Prime[n], 0, If[(Prime[n-1]+Prime[n+1])/2==Prime[n], 1, 2]], {n, 2, 100}]

CROSSREFS

Sequence in context: A117167 A117169 A046920 * A156836 A079483 A071460

Adjacent sequences:  A107596 A107597 A107598 * A107600 A107601 A107602

KEYWORD

nonn

AUTHOR

Zak Seidov (zakseidov(AT)yahoo.com), May 17 2005

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 14 19:37 EST 2012. Contains 205663 sequences.