CINXE.COM

A006562 - OEIS

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <link rel="stylesheet" href="/styles.css"> <meta name="format-detection" content="telephone=no"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name=viewport content="width=device-width, initial-scale=1"> <meta name="keywords" content="OEIS,integer sequences,Sloane" /> <title>A006562 - OEIS</title> <link rel="search" type="application/opensearchdescription+xml" title="OEIS" href="/oeis.xml"> <script> var myURL = "\/A006562" function redir() { var host = document.location.hostname; if(host != "oeis.org" && host != "127.0.0.1" && !/^([0-9.]+)$/.test(host) && host != "localhost" && host != "localhost.localdomain") { document.location = "https"+":"+"//"+"oeis"+".org/" + myURL; } } function sf() { if(document.location.pathname == "/" && document.f) document.f.q.focus(); } </script> </head> <body bgcolor=#ffffff onload="redir();sf()"> <div class=loginbar> <div class=login> <a href="/login?redirect=%2fA006562">login</a> </div> </div> <div class=center><div class=top> <center> <div class=donors> The OEIS is supported by <a href="http://oeisf.org/#DONATE">the many generous donors to the OEIS Foundation</a>. </div> <div class=banner> <a href="/"><img class=banner border="0" width="600" src="/banner2021.jpg" alt="A006562 - OEIS"></a> </div> </center> </div></div> <div class=center><div class=pagebody> <div class=searchbarcenter> <form name=f action="/search" method="GET"> <div class=searchbargreet> <div class=searchbar> <div class=searchq> <input class=searchbox maxLength=1024 name=q value="" title="Search Query"> </div> <div class=searchsubmit> <input type=submit value="Search" name=go> </div> <div class=hints> <span class=hints><a href="/hints.html">Hints</a></span> </div> </div> <div class=searchgreet> (Greetings from <a href="/welcome">The On-Line Encyclopedia of Integer Sequences</a>!) </div> </div> </form> </div> <div class=sequence> <div class=space1></div> <div class=line></div> <div class=seqhead> <div class=seqnumname> <div class=seqnum> A006562 </div> <div class=seqname> Balanced primes (of order one): primes which are the average of the previous prime and the following prime. <br><font size=-1>(Formerly M4011)</font> </div> </div> <div class=scorerefs> 150 </div> </div> <div> <div class=seqdatabox> <div class=seqdata>5, 53, 157, 173, 211, 257, 263, 373, 563, 593, 607, 653, 733, 947, 977, 1103, 1123, 1187, 1223, 1367, 1511, 1747, 1753, 1907, 2287, 2417, 2677, 2903, 2963, 3307, 3313, 3637, 3733, 4013, 4409, 4457, 4597, 4657, 4691, 4993, 5107, 5113, 5303, 5387, 5393</div> <div class=seqdatalinks> (<a href="/A006562/list">list</a>; <a href="/A006562/graph">graph</a>; <a href="/search?q=A006562+-id:A006562">refs</a>; <a href="/A006562/listen">listen</a>; <a href="/history?seq=A006562">history</a>; <a href="/search?q=id:A006562&fmt=text">text</a>; <a href="/A006562/internal">internal format</a>) </div> </div> </div> <div class=entry> <div class=section> <div class=sectname>OFFSET</div> <div class=sectbody> <div class=sectline>1,1</div> </div> </div> <div class=section> <div class=sectname>COMMENTS</div> <div class=sectbody> <div class=sectline>Subsequence of <a href="/A075540" title="Integers that are the average of three successive primes.">A075540</a>. - <a href="/wiki/User:Franklin_T._Adams-Watters">Franklin T. Adams-Watters</a>, Jan 11 2006</div> <div class=sectline>This subsequence of <a href="/A125830" title="Primes for which the level is equal to 1 in A117563.">A125830</a> and of <a href="/A162174" title="Primes classified by level.">A162174</a> gives primes of level (1,1): More generally, the i-th prime p(i) is of level (1,k) if and only if it has level 1 in <a href="/A117563" title="a(n) = A118534(n)/A117078(n) unless A117078(n) = 0 in which case a(n) = 0.">A117563</a> and 2 p(i) - p(i+1) = p(i-k). - <a href="/wiki/User:R茅mi_Eismann">R茅mi Eismann</a>, Feb 15 2007</div> <div class=sectline>Note the similarity between plots of <a href="/A006562" title="Balanced primes (of order one): primes which are the average of the previous prime and the following prime.">A006562</a> and <a href="/A013916" title="Numbers k such that the sum of the first k primes is prime.">A013916</a>. - <a href="/wiki/User:Bill_McEachen">Bill McEachen</a>, Sep 07 2009</div> <div class=sectline>Balanced primes U strong primes = good primes. Or, <a href="/A006562" title="Balanced primes (of order one): primes which are the average of the previous prime and the following prime.">A006562</a> U <a href="/A051634" title="Strong primes: prime(k) &gt; (prime(k-1) + prime(k+1))/2.">A051634</a> = <a href="/A046869" title="Good primes (version 1): prime(n)^2 &gt; prime(n-1)*prime(n+1).">A046869</a>. - <a href="/wiki/User:Juri-Stepan_Gerasimov">Juri-Stepan Gerasimov</a>, Mar 01 2010</div> <div class=sectline>Primes prime(n) such that <a href="/A001223" title="Prime gaps: differences between consecutive primes.">A001223</a>(n-1) = <a href="/A001223" title="Prime gaps: differences between consecutive primes.">A001223</a>(n). - <a href="/wiki/User:Irina_Gerasimova">Irina Gerasimova</a>, Jul 11 2013</div> <div class=sectline>Numbers m such that <a href="/A346399" title="a(n) is the number of symmetrically distributed consecutive primes centered at n (including n itself if n is prime).">A346399</a>(m) is odd and &gt;= 3. - <a href="/wiki/User:Ya-Ping_Lu">Ya-Ping Lu</a>, Dec 26 2021 and May 07 2024</div> <div class=sectline>&quot;Balanced&quot; means that the next and preceding gap are of the same size, i.e., the second difference <a href="/A036263" title="Second differences of primes.">A036263</a> vanishes; so these are the primes whose indices are 1 more than indices of zeros in <a href="/A036263" title="Second differences of primes.">A036263</a>, listed in <a href="/A064113" title="Indices k such that (1/3)*(prime(k)+prime(k+1)+prime(k+2)) is a prime.">A064113</a>. - <a href="/wiki/User:M._F._Hasler">M. F. Hasler</a>, Oct 15 2024</div> </div> </div> <div class=section> <div class=sectname>REFERENCES</div> <div class=sectbody> <div class=sectline>A. Murthy, Smarandache Notions Journal, Vol. 11 N. 1-2-3 Spring 2000.</div> <div class=sectline>N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).</div> <div class=sectline>David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 134.</div> </div> </div> <div class=section> <div class=sectname>LINKS</div> <div class=sectbody> <div class=sectline>T. D. Noe, <a href="/A006562/b006562.txt">Table of n, a(n) for n = 1..10000</a></div> <div class=sectline>M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972, p. 870.</div> <div class=sectline>Ernest G. Hibbs, <a href="https://www.proquest.com/openview/4012f0286b785cd732c78eb0fc6fce80">Component Interactions of the Prime Numbers</a>, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.</div> <div class=sectline>Shubhankar Paul, <a href="https://www.erpublication.org/admin/vol_issue1/upload%20Image/IJETR011954.pdf">Ten Problems of Number Theory</a>, International Journal of Engineering and Technical Research (IJETR), ISSN: 2321-0869, Volume-1, Issue-9, November 2013.</div> <div class=sectline>Shubhankar Paul, <a href="http://erpublication.org/admin/vol_issue1/upload%20Image/IJETR012013.pdf">Legendre, Grimm, Balanced Prime, Prime triple, Polignac's conjecture, a problem and 17 tips with proof to solve problems on number theory</a>, International Journal of Engineering and Technical Research (IJETR), ISSN: 2321-0869, Volume-1, Issue-10, December 2013.</div> <div class=sectline>Wikipedia, <a href="https://en.wikipedia.org/wiki/Balanced_prime">Balanced prime</a>.</div> </div> </div> <div class=section> <div class=sectname>FORMULA</div> <div class=sectbody> <div class=sectline>2*p_n = p_(n-1) + p_(n+1).</div> <div class=sectline>Equals { p = prime(k) | <a href="/A118534" title="a(n) is the largest k such that prime(n+1) = prime(n) + (prime(n) mod k), or 0 if no such k exists.">A118534</a>(k) = prime(k-1) }. - <a href="/wiki/User:R茅mi_Eismann">R茅mi Eismann</a>, Nov 30 2009</div> <div class=sectline>a(n) = <a href="/A000040" title="The prime numbers.">A000040</a>(<a href="/A064113" title="Indices k such that (1/3)*(prime(k)+prime(k+1)+prime(k+2)) is a prime.">A064113</a>(n) + 1) = (<a href="/A122535" title="Smallest prime of a triple of successive primes, where the middle one is the arithmetic mean of the other two.">A122535</a>(n) + <a href="/A181424" title="Primes p such that p and the two previous primes are in arithmetic progression.">A181424</a>(n)) / 2. - <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Jan 20 2012</div> <div class=sectline>a(n) = <a href="/A122535" title="Smallest prime of a triple of successive primes, where the middle one is the arithmetic mean of the other two.">A122535</a>(n) + <a href="/A117217" title="Common prime gap associated with the primes A122535.">A117217</a>(n). - <a href="/wiki/User:Zak_Seidov">Zak Seidov</a>, Feb 14 2013</div> <div class=sectline>Equals <a href="/A145025" title="Numbers which are the average of two consecutive odd primes (A024675) together with primes which are the average of the prev...">A145025</a> intersect <a href="/A000040" title="The prime numbers.">A000040</a> = <a href="/A145025" title="Numbers which are the average of two consecutive odd primes (A024675) together with primes which are the average of the prev...">A145025</a> \ <a href="/A024675" title="Average of two consecutive odd primes.">A024675</a>. - <a href="/wiki/User:M._F._Hasler">M. F. Hasler</a>, Jun 01 2013</div> <div class=sectline>Conjecture: Limit_{n-&gt;oo} n*(log(a(n)))^2 / a(n) = 1/2. - <a href="/wiki/User:Alain_Rocchelli">Alain Rocchelli</a>, Mar 21 2024</div> <div class=sectline>Conjecture: The asymptotic limit of the average of a(n+1)-a(n) is equivalent to 2*(log(a(n)))^2. Otherwise formulated: 2 * Sum_{n=1..N} (log(a(n)))^2 ~ a(N). - <a href="/wiki/User:Alain_Rocchelli">Alain Rocchelli</a>, Mar 23 2024</div> </div> </div> <div class=section> <div class=sectname>EXAMPLE</div> <div class=sectbody> <div class=sectline>5 belongs to the sequence because 5 = (3 + 7)/2. Likewise 53 = (47 + 59)/2.</div> <div class=sectline>5 belongs to the sequence because it is a term, but not first or last, of the AP of consecutive primes (3, 5, 7).</div> <div class=sectline>53 belongs to the sequence because it is a term, but not first or last, of the AP of consecutive primes (47, 53, 59).</div> <div class=sectline>257 and 263 belong to the sequence because they are terms, but not first or last, of the AP of consecutive primes (251, 257, 263, 269).</div> </div> </div> <div class=section> <div class=sectname>MATHEMATICA</div> <div class=sectbody> <div class=sectline>Transpose[ Select[ Partition[ Prime[ Range[1000]], 3, 1], #[[2]] ==(#[[1]] + #[[3]])/2 &amp;]][[2]]</div> <div class=sectline>p=Prime[Range[1000]]; p[[Flatten[1+Position[Differences[p, 2], 0]]]]</div> <div class=sectline>Prime[#]&amp;/@SequencePosition[Differences[Prime[Range[800]]], {x_, x_}][[All, 2]] (* Requires Mathematica version 10 or later *) (* <a href="/wiki/User:Harvey_P._Dale">Harvey P. Dale</a>, Jan 31 2019 *)</div> </div> </div> <div class=section> <div class=sectname>PROG</div> <div class=sectbody> <div class=sectline>(PARI) betwixtpr(n) = { local(c1, c2, x, y); for(x=2, n, c1=c2=0; for(y=prime(x-1)+1, prime(x)-1, if(!isprime(y), c1++); ); for(y=prime(x)+1, prime(x+1)-1, if(!isprime(y), c2++); ); if(c1==c2, print1(prime(x)&quot;, &quot;)) ) } \\ <a href="/wiki/User:Cino_Hilliard">Cino Hilliard</a>, Jan 25 2005</div> <div class=sectline>(PARI) forprime(p=1, 999, p-precprime(n-1)==nextprime(p+1)-p &amp;&amp; print1(p&quot;, &quot;)) \\ <a href="/wiki/User:M._F._Hasler">M. F. Hasler</a>, Jun 01 2013</div> <div class=sectline>(PARI) is(n)=n-precprime(n-1)==nextprime(n+1)-n &amp;&amp; isprime(n) \\ <a href="/wiki/User:Charles_R_Greathouse_IV">Charles R Greathouse IV</a>, Apr 07 2016</div> <div class=sectline>(Haskell)</div> <div class=sectline>a006562 n = a006562_list !! (n-1)</div> <div class=sectline>a006562_list = filter ((== 1) . a010051) a075540_list</div> <div class=sectline>-- <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Jan 20 2012</div> <div class=sectline>(Haskell)</div> <div class=sectline>a006562 n = a006562_list !! (n-1)</div> <div class=sectline>a006562_list = h a000040_list where</div> <div class=sectline> h (p:qs@(q:r:ps)) = if 2 * q == (p + r) then q : h qs else h qs</div> <div class=sectline>-- <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, May 09 2013</div> <div class=sectline>(Magma) [a: n in [1..1000] | IsPrime(a) where a is NthPrime(n)-NthPrime(n+1)+NthPrime(n+2)]; // <a href="/wiki/User:Vincenzo_Librandi">Vincenzo Librandi</a>, Jun 23 2016</div> <div class=sectline>(Python)</div> <div class=sectline>from sympy import nextprime; p, q, r = 2, 3, 5</div> <div class=sectline>while q &lt; 6000:</div> <div class=sectline> if 2*q == p + r: print(q, end = &quot;, &quot;)</div> <div class=sectline> p, q, r = q, r, nextprime(r) # <a href="/wiki/User:Ya-Ping_Lu">Ya-Ping Lu</a>, Dec 23 2021</div> </div> </div> <div class=section> <div class=sectname>CROSSREFS</div> <div class=sectbody> <div class=sectline>Primes <a href="/A000040" title="The prime numbers.">A000040</a> whose indices are 1 more than <a href="/A064113" title="Indices k such that (1/3)*(prime(k)+prime(k+1)+prime(k+2)) is a prime.">A064113</a>, indices of zeros in <a href="/A036263" title="Second differences of primes.">A036263</a> (second differences of the primes).</div> <div class=sectline>Cf. <a href="/A082077" title="Balanced primes of order two.">A082077</a>, <a href="/A082078" title="Balanced primes of order three.">A082078</a>, <a href="/A082079" title="Balanced primes of order four.">A082079</a>, <a href="/A096697" title="Balanced primes of order five.">A096697</a>, <a href="/A096698" title="Balanced primes of order six.">A096698</a>, <a href="/A096699" title="Balanced primes of order seven.">A096699</a>, <a href="/A096700" title="Balanced primes of order eight.">A096700</a>, <a href="/A096701" title="Balanced primes of order nine.">A096701</a>, <a href="/A096702" title="Balanced primes of order ten.">A096702</a>, <a href="/A096703" title="Balanced primes of order eleven.">A096703</a>, <a href="/A096704" title="Balanced primes of order twelve.">A096704</a>, <a href="/A096693" title="Balance index of each prime.">A096693</a>, <a href="/A051634" title="Strong primes: prime(k) &gt; (prime(k-1) + prime(k+1))/2.">A051634</a>, <a href="/A051635" title="Weak primes: prime(n) &lt; (prime(n-1) + prime(n+1))/2.">A051635</a>, <a href="/A054342" title="First occurrence of distances of equidistant lonely primes. Each equidistant prime is at the same distance (or has the same ...">A054342</a>, <a href="/A117078" title="a(n) is the smallest k such that prime(n+1) = prime(n) + (prime(n) mod k), or 0 if no such k exists.">A117078</a>, <a href="/A117563" title="a(n) = A118534(n)/A117078(n) unless A117078(n) = 0 in which case a(n) = 0.">A117563</a>, <a href="/A125830" title="Primes for which the level is equal to 1 in A117563.">A125830</a>, <a href="/A117876" title="Primes p=prime(k) of level (1,2), i.e., such that A118534(k) = prime(k-2).">A117876</a>, <a href="/A125576" title="Primes p=prime(i) of level (1,15), i.e., such that A118534(i)=prime(i-15).">A125576</a>, <a href="/A046869" title="Good primes (version 1): prime(n)^2 &gt; prime(n-1)*prime(n+1).">A046869</a>, <a href="/A173891" title="Numbers n such that the n-th noncomposite number plus the (n+2)nd noncomposite number is an even semiprime.">A173891</a>, <a href="/A173892" title="Numbers k such that k and k+6 are both balanced primes.">A173892</a>, <a href="/A173893" title="(Average of twin balanced prime pairs)/10.">A173893</a>, <a href="/A006560" title="Smallest starting prime for n consecutive primes in arithmetic progression.">A006560</a>, <a href="/A075540" title="Integers that are the average of three successive primes.">A075540</a>.</div> <div class=sectline>Cf. <a href="/A225494" title="Numbers having only balanced prime factors, cf. A006562.">A225494</a> (multiplicative closure); complement of <a href="/A178943" title="Primes that are not balanced primes (see A006562).">A178943</a> with respect to <a href="/A000040" title="The prime numbers.">A000040</a>.</div> <div class=sectline>Cf. <a href="/A055380" title="Central prime p in the smallest (2n+1)-tuple of consecutive primes that are symmetric with respect to p.">A055380</a>, <a href="/A051795" title="Doubly balanced primes: primes which are averages of both their immediate and their second neighbors.">A051795</a>, <a href="/A081415" title="Triply balanced primes: primes which are averages of both their immediate neighbor, their second neighbors and their third n...">A081415</a>, <a href="/A096710" title="Quadruply balanced primes: primes which are averages of their immediate neighbor primes, their second neighbor primes, their...">A096710</a> for other balanced prime sequences.</div> <div class=sectline>Sequence in context: <a href="/A106097" title="Primes with maximal digit = 5.">A106097</a> <a href="/A163580" title="Primes of the form floor(k+A000217(k-1)*Pi), Pi = A000796, k integer.">A163580</a> <a href="/A075540" title="Integers that are the average of three successive primes.">A075540</a> * <a href="/A094847" title="Let p = n-th odd prime. Then a(n) = least positive integer congruent to 5 modulo 8 such that Legendre(a(n), q) = -1 for all ...">A094847</a> <a href="/A001992" title="Let p = n-th odd prime. Then a(n) = least prime congruent to 5 modulo 8 such that Legendre(a(n), q) = -1 for all odd primes ...">A001992</a> <a href="/A139899" title="Primes of the form 5x^2+48y^2.">A139899</a></div> <div class=sectline>Adjacent sequences: <a href="/A006559" title="Short period primes: the decimal expansion of 1/p has period less than p-1, but greater than zero.">A006559</a> <a href="/A006560" title="Smallest starting prime for n consecutive primes in arithmetic progression.">A006560</a> <a href="/A006561" title="Number of intersections of diagonals in the interior of a regular n-gon.">A006561</a> * <a href="/A006563" title="(2*n)!-Sum ((-1)^(i+1)*binomial(n,i)*2^i*(2*i-1)!,i=1..n).">A006563</a> <a href="/A006564" title="Icosahedral numbers: a(n) = n*(5*n^2 - 5*n + 2)/2.">A006564</a> <a href="/A006565" title="Number of ways to color vertices of a hexagon using &lt;= n colors, allowing only rotations.">A006565</a></div> </div> </div> <div class=section> <div class=sectname>KEYWORD</div> <div class=sectbody> <div class=sectline><span title="a sequence of nonnegative numbers">nonn</span>,<span title="it is very easy to produce terms of sequence">easy</span>,<span title="an exceptionally nice sequence">nice</span>,<span title="edited within the last two weeks">changed</span></div> </div> </div> <div class=section> <div class=sectname>AUTHOR</div> <div class=sectbody> <div class=sectline><a href="/wiki/User:N._J._A._Sloane">N. J. A. Sloane</a> and <a href="/wiki/User:Robert_G._Wilson_v">Robert G. Wilson v</a></div> </div> </div> <div class=section> <div class=sectname>EXTENSIONS</div> <div class=sectbody> <div class=sectline>Reworded comment and added formula from R. Eismann. - <a href="/wiki/User:M._F._Hasler">M. F. Hasler</a>, Nov 30 2009</div> <div class=sectline>Edited by <a href="/wiki/User:Daniel_Forgues">Daniel Forgues</a>, Jan 15 2011</div> </div> </div> <div class=section> <div class=sectname>STATUS</div> <div class=sectbody> <div class=sectline>approved</div> </div> </div> </div> <div class=space10></div> </div> </div></div> <p> <div class=footerpad></div> <div class=footer> <center> <div class=bottom> <div class=linksbar> <a href="/">Lookup</a> <a href="/wiki/Welcome"><font color="red">Welcome</font></a> <a href="/wiki/Main_Page"><font color="red">Wiki</font></a> <a href="/wiki/Special:RequestAccount">Register</a> <a href="/play.html">Music</a> <a href="/plot2.html">Plot 2</a> <a href="/demo1.html">Demos</a> <a href="/wiki/Index_to_OEIS">Index</a> <a href="/webcam">WebCam</a> <a href="/Submit.html">Contribute</a> <a href="/eishelp2.html">Format</a> <a href="/wiki/Style_Sheet">Style Sheet</a> <a href="/transforms.html">Transforms</a> <a href="/ol.html">Superseeker</a> <a href="/recent">Recents</a> </div> <div class=linksbar> <a href="/community.html">The OEIS Community</a> </div> <div class=linksbar> Maintained by <a href="http://oeisf.org">The OEIS Foundation Inc.</a> </div> <div class=dbinfo>Last modified March 4 12:23 EST 2025. Contains 381403 sequences.</div> <div class=legal> <a href="/wiki/Legal_Documents">License Agreements, Terms of Use, Privacy Policy</a> </div> </div> </center> </div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10