OFFSET
1,1
EXAMPLE
List of first terms:
a(n) pi(a(n)) average-median
3, 2, 1/3 = (2 + 3 + 5)/3 - 3
7, 4, 2/3 = (5 + 7 + 11)/3 - 7
29, 10, -4/3 = (23 + 29 + 31)/3 - 29
113, 30, 10/3
523, 99, 16/3
1151, 190, -20/3
1327, 217, 28/3
9551, 1183, 32/3
PROG
(PARI) a337489(limp) = {my(p1=0, p2=2, p3=3, s=p1+p2+p3, d=0); forprime(p=5, limp, s=s-p1+p; my(dd=abs(s/3-p3)); if(dd>d, print1(p3, ", "); d=dd); p1=p2; p2=p3; p3=p)};
a337489(500000000)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Aug 29 2020
STATUS
approved