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 A081415 #34 Jun 23 2025 02:59:10 %S A081415 683783,1056317,1100261,2241709,2815301,4746359,10009049,12003209, %T A081415 13810981,14907649,15403009,15730067,16595081,17518201,19755301, %U A081415 20378327,21006487,21574453,21579983,22237121,22625179,25876901,26018791,26354201,27188141,28469461 %N A081415 Triply balanced primes: primes which are averages of both their immediate neighbor, their second neighbors and their third neighbors. %C A081415 Equivalently, primes which are balanced primes of orders 1, 2, and 3. - _Muniru A Asiru_, Apr 08 2018 %C A081415 Numbers m such that A346399(m) is odd and >= 7. - _Ya-Ping Lu_, May 11 2024 %H A081415 Jud McCranie, <a href="/A081415/b081415.txt">Table of n, a(n) for n = 1..1000</a> %H A081415 Wikipedia, <a href="https://en.wikipedia.org/wiki/Balanced_prime">Balanced prime</a> %e A081415 p = 683383: 683747 + ... + p + ... + 683819 = 7p; 683759 + ... + p + ... + 683807 = 5p; 683777 + p + 683789 = 3p. %t A081415 a = {}; Do[p = 2Prime[n]; If[p == Prime[n - 1] + Prime[n + 1] && p == Prime[n - 2] + Prime[n + 2] && p == Prime[n - 3] + Prime[n + 3], Print[p / 2]; AppendTo[a, p / 2]], {n, 5, 1100000}]; a (* _Robert G. Wilson v_, Jun 28 2004 *) %t A081415 Transpose[Select[Partition[Prime[Range[1620000]],7,1],(#[[1]]+#[[7]])/2 == (#[[2]]+#[[6]])/2==(#[[3]]+#[[5]])/2==#[[4]]&]][[4]] (* _Harvey P. Dale_, Sep 13 2013 *) %o A081415 (GAP) P:=Filtered([1,3..3*10^7+1],IsPrime);; %o A081415 a:=Intersection(List([1,2,3],b->List(Filtered(List([0..Length(P)-(2*b+1)],k->List([1..2*b+1],j->P[j+k])),i->Sum(i)/(2*b+1)=i[b+1]),m->m[b+1]))); # _Muniru A Asiru_, Apr 08 2018 %o A081415 (Python) %o A081415 from sympy import nextprime; p, q, r, s, t, u, v = 2, 3, 5, 7, 11, 13, 17 %o A081415 while v < 29000000: %o A081415 if p + v == q + u == r + t == 2*s: print(s, end = ', ') %o A081415 p, q, r, s, t, u, v = q, r, s, t, u, v, nextprime(v) # _Ya-Ping Lu_, May 11 2024 %Y A081415 Cf. A006562, A051795, A055380, A096710, A346399. %K A081415 nonn %O A081415 1,1 %A A081415 _Labos Elemer_, Apr 02 2003