OFFSET
1,1
EXAMPLE
List of first terms:
a(n) pi(a(n)) average-median
5, 3, 3/5 = (2 + 3 + 5 + 7 + 11)/5 - 5
7, 4, 4/5 = (3 + 5 + 7 + 11 + 13)/5 - 7
19, 8, 6/5 = (13 + 17 + 19 + 23 + 29)/5 - 19
47, 15, 8/5
97, 25, -12/5
109, 29, 14/5
113, 30, 22/5
199, 46, 28/5
887, 154, 34/5
1151, 190, -36/5
1277, 206, -38/5
1327, 217, 12
9551, 1183, 14
PROG
(PARI) a337439(limp) = {my(p1=0, p2=2, p3=3, p4=5, p5=7, s=p1+p2+p3+p4+p5, d=0); forprime(p=11, limp, s=s-p1+p; my(dd=abs(s/5-p4)); if(dd>d, print1(p4, ", "); d=dd); p1=p2; p2=p3; p3=p4; p4=p5; p5=p)};
a337439(500000000)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Aug 29 2020
STATUS
approved