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 A053709 #47 Jan 18 2022 10:14:56 %S A053709 3,5,10,21,171,190,348,1638,3329 %N A053709 Prime balanced factorials: numbers k such that k! is the mean of its 2 closest primes. %C A053709 Also, the integers k such that A033932(k) = A033933(k). %C A053709 k! is an interprime, i.e., the average of two successive primes. %C A053709 The difference between k! and any of its two closest primes must be 1 or exceed k. - _Franklin T. Adams-Watters_ %C A053709 Larger terms may involve probable primes. - _Hans Havermann_, Aug 14 2014 %e A053709 For the 1st term, 3! is in the middle between its closest prime neighbors 5 and 7. %e A053709 For the 2nd term, 5! is in the middle between its closest prime neighbors 113 and 127. %e A053709 From _Jon E. Schoenfield_, Jan 14 2022: (Start) %e A053709 In the table below, k = a(n), k! - d and k! + d are the two closest primes to k!, and d = A033932(k) = A033933(k) = A053711(n): %e A053709 . %e A053709 n k d %e A053709 - ---- ---- %e A053709 1 3 1 %e A053709 2 5 7 %e A053709 3 10 11 %e A053709 4 21 31 %e A053709 5 171 397 %e A053709 6 190 409 %e A053709 7 348 1657 %e A053709 8 1638 2131 %e A053709 9 3329 7607 %e A053709 (End) %p A053709 for n from 3 to 200 do j := n!-prevprime(n!): if not isprime(n!+j) then next fi: i := 1: while not isprime(n!+i) and (i<=j) do i := i+2 od: if i=j then print(n):fi:od: %t A053709 PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k] Do[ a = n!; If[2a == PrevPrim[a] + NextPrim[a], Print[n]], {n, 3, 415}] %Y A053709 Cf. A053711 (distances), A033932, A033933, A006990, A037151, A006562, A053710, A075275. %Y A053709 Cf. A075409 (smallest m such that n!-m and n!+m are both primes). %K A053709 nonn,more %O A053709 1,1 %A A053709 _Labos Elemer_, Feb 10 2000 %E A053709 a(5)-a(6) from _Jud McCranie_, Jul 04 2000 %E A053709 a(7) from _Robert G. Wilson v_, Sep 17 2002 %E A053709 a(8) from _Donovan Johnson_, Mar 23 2008 %E A053709 a(9) from _Hans Havermann_, Aug 14 2014