OFFSET
1,7
COMMENTS
n=9:p(9)=23 is between 18 and 27, closer to 27, so a(9)=27-23=+4.
FORMULA
a(n)=p[n]-n*floor[(floor(n/2)+p[n])/n], where p[n] is the n-th prime.
MATHEMATICA
Table[Prime[n]-n*Floor[(Floor[n/2]+Prime[n])/n], {n, 1, 100}]
CROSSREFS
KEYWORD
sign
AUTHOR
Labos Elemer, Apr 22 2003
STATUS
approved