OFFSET
2,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 2..1000
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}]
w[{a_, b_, c_}]:=With[{x=Floor[a+c]/2}, Which[x<b, 0, x==b, 1, True, 2]]; w/@Partition[Prime[Range[110]], 3, 1] (* Harvey P. Dale, Oct 05 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, May 17 2005
STATUS
approved