CINXE.COM
A097509 - 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>A097509 - OEIS</title> <link rel="search" type="application/opensearchdescription+xml" title="OEIS" href="/oeis.xml"> <script> var myURL = "\/A097509" 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=%2fA097509">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="A097509 - 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> A097509 </div> <div class=seqname> a(n) is the number of times that n occurs as floor(k * sqrt(2)) - k. </div> </div> <div class=scorerefs> 12 </div> </div> <div> <div class=seqdatabox> <div class=seqdata>3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2</div> <div class=seqdatalinks> (<a href="/A097509/list">list</a>; <a href="/A097509/graph">graph</a>; <a href="/search?q=A097509+-id:A097509">refs</a>; <a href="/A097509/listen">listen</a>; <a href="/history?seq=A097509">history</a>; <a href="/search?q=id:A097509&fmt=text">text</a>; <a href="/A097509/internal">internal format</a>) </div> </div> </div> <div class=entry> <div class=section> <div class=sectname>OFFSET</div> <div class=sectbody> <div class=sectline>0,1</div> </div> </div> <div class=section> <div class=sectname>COMMENTS</div> <div class=sectbody> <div class=sectline>Frequency of n in the sequence <a href="/A097508" title="a(n) = floor(n*(sqrt(2)-1)).">A097508</a>. [<a href="/wiki/User:R._J._Mathar">R. J. Mathar</a>, Sep 19 2010]</div> <div class=sectline>Theorem: If the initial term is omitted, this is identical to <a href="/A276862" title="First differences of the Beatty sequence A003151 for 1 + sqrt(2).">A276862</a>. For proof, see solution to Problem B6 in the 81st William Lowell Putnam Mathematical Competition (see links). The argument may also imply that <a href="/A082844" title="Start with 3,2 and apply the rule a(a(1)+a(2)+...+a(n)) = a(n), fill in any undefined terms with a(t) = 2 if a(t-1) = 3 and ...">A082844</a> is also the same, apart from two initial terms. - Manjul Bhargava, Kiran Kedlaya, and Lenny Ng, Mar 02 2021. Postscript from the same authors, Sep 09 2021: We have proved that the present sequence, <a href="/A097509" title="a(n) is the number of times that n occurs as floor(k * sqrt(2)) - k.">A097509</a> (indexed from 0) matches the definition of our {c_i}.</div> </div> </div> <div class=section> <div class=sectname>LINKS</div> <div class=sectbody> <div class=sectline>Robert Israel, <a href="/A097509/b097509.txt">Table of n, a(n) for n = 0..10000</a></div> <div class=sectline>Manjul Bhargava, Kiran Kedlaya, and Lenny Ng, <a href="https://kskedlaya.org/putnam-archive/2020s.pdf">Solutions to the 81st William Lowell Putnam Mathematical Competition</a></div> <div class=sectline>Putnam Competitions, <a href="https://kskedlaya.org/putnam-archive/2020.pdf">The 81st William Lowell Putnam Mathematical Competition, Saturday, February 20, 2021, Problems</a>.</div> <div class=sectline>Putnam Competitions, <a href="/A097509/a097509.png">The 81st William Lowell Putnam Mathematical Competition, Saturday, February 20, 2021, Problems</a> [Local copy of Problem B6.]</div> <div class=sectline>Putnam Competitions, <a href="https://kskedlaya.org/putnam-archive/2020s.pdf">The 81st William Lowell Putnam Mathematical Competition, Saturday, February 20, 2021, Solutions from Manjul Bhargava, Kiran Kedlaya, and Lenny Ng</a>.</div> <div class=sectline>Putnam Competitions, <a href="/A097509/a097509_1.png">The 81st William Lowell Putnam Mathematical Competition, Saturday, February 20, 2021, Solutions from Manjul Bhargava, Kiran Kedlaya, and Lenny Ng</a> [Local copy of first solution to Problem B6.]</div> <div class=sectline>Luke Schaeffer, Jeffrey Shallit, and Stefan Zorcic, <a href="https://arxiv.org/abs/2402.08331">Beatty Sequences for a Quadratic Irrational: Decidability and Applications</a>, arXiv:2402.08331 [math.NT], 2024. See pp. 17-19.</div> <div class=sectline>N. J. A. Sloane, <a href="/A115004/a115004.txt">Families of Essentially Identical Sequences</a>, Mar 24 2021 (Includes this sequence)</div> </div> </div> <div class=section> <div class=sectname>FORMULA</div> <div class=sectbody> <div class=sectline>a(n) = <a href="/A006337" title="An "eta-sequence": a(n) = floor( (n+1)*sqrt(2) ) - floor( n*sqrt(2) ).">A006337</a>(n)-1. - <a href="/wiki/User:Robert_G._Wilson_v">Robert G. Wilson v</a>, Aug 21 2014</div> <div class=sectline>Conjecture: a(n+1) = <a href="/A082844" title="Start with 3,2 and apply the rule a(a(1)+a(2)+...+a(n)) = a(n), fill in any undefined terms with a(t) = 2 if a(t-1) = 3 and ...">A082844</a>(n). - <a href="/wiki/User:Benedict_W._J._Irwin">Benedict W. J. Irwin</a>, Mar 13 2016</div> <div class=sectline><a href="/A245219" title="Continued fraction expansion of the constant c in A245218; c = sup{f(n,1)}, where f(1,x) = x + 1 and thereafter f(n,x) = x +...">A245219</a> appears to be another sequence identical to this one.</div> </div> </div> <div class=section> <div class=sectname>MAPLE</div> <div class=sectbody> <div class=sectline>S:= [seq(floor(n*sqrt(2))-n, n=0..1000)]:</div> <div class=sectline>seq(numboccur(i, S), i=0..max(S)); # <a href="/wiki/User:Robert_Israel">Robert Israel</a>, Mar 13 2016</div> </div> </div> <div class=section> <div class=sectname>MATHEMATICA</div> <div class=sectbody> <div class=sectline>f[n_] := Floor[n/Cos[Pi/4]] - n; d = Array[f, 500, 0]; Tally[ Array[ f, 254, 0]][[All, 2]] (* <a href="/wiki/User:Robert_G._Wilson_v">Robert G. Wilson v</a>, Aug 21 2014 *)</div> </div> </div> <div class=section> <div class=sectname>CROSSREFS</div> <div class=sectbody> <div class=sectline>Cf. <a href="/A006337" title="An "eta-sequence": a(n) = floor( (n+1)*sqrt(2) ) - floor( n*sqrt(2) ).">A006337</a>, <a href="/A082844" title="Start with 3,2 and apply the rule a(a(1)+a(2)+...+a(n)) = a(n), fill in any undefined terms with a(t) = 2 if a(t-1) = 3 and ...">A082844</a>, <a href="/A097508" title="a(n) = floor(n*(sqrt(2)-1)).">A097508</a>, <a href="/A276862" title="First differences of the Beatty sequence A003151 for 1 + sqrt(2).">A276862</a>.</div> <div class=sectline>The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with <a href="/A003151" title="Beatty sequence for 1+sqrt(2); a(n) = floor(n*(1+sqrt(2))).">A003151</a> as the parent: <a href="/A003151" title="Beatty sequence for 1+sqrt(2); a(n) = floor(n*(1+sqrt(2))).">A003151</a>, <a href="/A001951" title="A Beatty sequence: a(n) = floor(n*sqrt(2)).">A001951</a>, <a href="/A001952" title="A Beatty sequence: a(n) = floor(n*(2 + sqrt(2))).">A001952</a>, <a href="/A003152" title="A Beatty sequence: a(n) = floor(n*(1+1/sqrt(2))).">A003152</a>, <a href="/A006337" title="An "eta-sequence": a(n) = floor( (n+1)*sqrt(2) ) - floor( n*sqrt(2) ).">A006337</a>, <a href="/A080763" title="Exchange 1's and 2's in the eta-sequence A006337.">A080763</a>, <a href="/A082844" title="Start with 3,2 and apply the rule a(a(1)+a(2)+...+a(n)) = a(n), fill in any undefined terms with a(t) = 2 if a(t-1) = 3 and ...">A082844</a> (conjectured), <a href="/A097509" title="a(n) is the number of times that n occurs as floor(k * sqrt(2)) - k.">A097509</a>, <a href="/A159684" title="Sturmian word: limit S(infinity) where S(0) = 0, S(1) = 0,1 and for n>=1, S(n+1) = S(n)S(n)S(n-1).">A159684</a>, <a href="/A188037" title="a(n) = floor(nr) - 1 - floor((n-1)r), where r = sqrt(2).">A188037</a>, <a href="/A245219" title="Continued fraction expansion of the constant c in A245218; c = sup{f(n,1)}, where f(1,x) = x + 1 and thereafter f(n,x) = x +...">A245219</a> (conjectured), <a href="/A276862" title="First differences of the Beatty sequence A003151 for 1 + sqrt(2).">A276862</a>. - <a href="/wiki/User:N._J._A._Sloane">N. J. A. Sloane</a>, Mar 09 2021</div> <div class=sectline>Sequence in context: <a href="/A363445" title="Turn sequence of a fractal-like curve which is also the perimeter around an aperiodic tiling based on the "hat" monotile. Se...">A363445</a> <a href="/A363348" title="Turn sequence of a non-Eulerian path for drawing an infinite aperiodic tiling based on the "hat" monotile. See the comments ...">A363348</a> <a href="/A245219" title="Continued fraction expansion of the constant c in A245218; c = sup{f(n,1)}, where f(1,x) = x + 1 and thereafter f(n,x) = x +...">A245219</a> * <a href="/A095206" title="Let n = abcd...; a,b,c,d,... are digits of n. Define f(a) = bcd..., f(b) = acd..., f(c) = abd... and f(d) = abc..., i.e., f(...">A095206</a> <a href="/A344129" title="The minimum number of steps required for a knight, starting at the central square numbered 1, to reach the square numbered n...">A344129</a> <a href="/A308006" title="Iterate the map x->A308005(x) starting at x=n; a(n) is the number of steps before the first repeated term is encountered.">A308006</a></div> <div class=sectline>Adjacent sequences: <a href="/A097506" title="Duplicate of A001951.">A097506</a> <a href="/A097507" title="24*a(n) counts the solid partitions of n that have no symmetry under any single or combined operations built from mirroring ...">A097507</a> <a href="/A097508" title="a(n) = floor(n*(sqrt(2)-1)).">A097508</a> * <a href="/A097510" title="Leftmost terms of the triangle A097825.">A097510</a> <a href="/A097511" title="Rightmost terms of the triangle A097825.">A097511</a> <a href="/A097512" title="a(n) = 6*Lucas(2n) - Fibonacci(2n+2).">A097512</a></div> </div> </div> <div class=section> <div class=sectname>KEYWORD</div> <div class=sectbody> <div class=sectline><span title="it is very easy to produce terms of sequence">easy</span>,<span title="a sequence of nonnegative numbers">nonn</span></div> </div> </div> <div class=section> <div class=sectname>AUTHOR</div> <div class=sectbody> <div class=sectline><a href="/wiki/User:Odimar_Fabeny">Odimar Fabeny</a>, Aug 26 2004</div> </div> </div> <div class=section> <div class=sectname>EXTENSIONS</div> <div class=sectbody> <div class=sectline>More terms from <a href="/wiki/User:Robert_G._Wilson_v">Robert G. Wilson v</a>, Aug 21 2014</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 April 10 04:17 EDT 2025. Contains 382653 sequences.</div> <div class=legal> <a href="/wiki/Legal_Documents">License Agreements, Terms of Use, Privacy Policy</a> </div> </div> </center> </div> </body> </html>