This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A337489 #10 Aug 01 2025 07:48:07 %S A337489 3,7,29,113,523,1151,1327,9551,15683,19609,25471,31397,156007,360653, %T A337489 370261,492113,1349533,1357201,1357333,1562051,2010733,4652507, %U A337489 17051707,17051887,20831323,47326693,47326913,122164747,189695893,191912783,387096133,428045741,436273291 %N A337489 a(n) is the k-th prime, such that abs(prime(k) - Sum_{j=k-1..k+1} prime(j)/3) sets a new record. %C A337489 A337488 are the corresponding values of k. %e A337489 List of first terms: %e A337489 a(n) pi(a(n)) average-median %e A337489 3, 2, 1/3 = (2 + 3 + 5)/3 - 3 %e A337489 7, 4, 2/3 = (5 + 7 + 11)/3 - 7 %e A337489 29, 10, -4/3 = (23 + 29 + 31)/3 - 29 %e A337489 113, 30, 10/3 %e A337489 523, 99, 16/3 %e A337489 1151, 190, -20/3 %e A337489 1327, 217, 28/3 %e A337489 9551, 1183, 32/3 %o A337489 (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)}; %o A337489 a337489(500000000) %Y A337489 Cf. A006562, A034961, A075540, A292530, A337438, A337439, A337488. %K A337489 nonn %O A337489 1,1 %A A337489 _Hugo Pfoertner_, Aug 29 2020 %E A337489 Name edited by _Peter Munn_, Aug 01 2025