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!)
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

%I #3 Mar 30 2012 17:26:16

%S 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,

%T 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,

%U 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

%N 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.).

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

%t 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}]

%K nonn

%O 2,1

%A _Zak Seidov_, May 17 2005

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 27 13:14 EDT 2024. Contains 372019 sequences. (Running on oeis4.)