cp's OEIS Frontend

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.

A097508 a(n) = floor(n*(sqrt(2)-1)).

This page as a plain text file.
%I A097508 #58 Feb 14 2024 17:27:16
%S A097508 0,0,0,1,1,2,2,2,3,3,4,4,4,5,5,6,6,7,7,7,8,8,9,9,9,10,10,11,11,12,12,
%T A097508 12,13,13,14,14,14,15,15,16,16,16,17,17,18,18,19,19,19,20,20,21,21,21,
%U A097508 22,22,23,23,24,24,24,25,25,26,26,26,27,27,28,28,28,29,29,30,30,31,31,31
%N A097508 a(n) = floor(n*(sqrt(2)-1)).
%C A097508 Old name was: Differences between floor(n*sqrt(2)) and n.
%H A097508 G. C. Greubel, <a href="/A097508/b097508.txt">Table of n, a(n) for n = 0..5000</a>
%H A097508 Heinz H. Bauschke, Minh N. Dao, and Scott B. Lindstrom, <a href="https://arxiv.org/abs/1804.08880">The Douglas-Rachford algorithm for a hyperplane and a doubleton</a>, arXiv:1804.08880 [math.OC], 2018.
%H A097508 Marcel Celaya and Frank Ruskey, <a href="https://arxiv.org/abs/1307.0153">Morphic Words and Nested Recurrence Relations</a>, arXiv preprint arXiv:1307.0153 [math.CO], 2013.
%H A097508 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-18.
%F A097508 a(n) = (floor(n / cos(45 degrees))) - n.
%F A097508 a(n) = A001951(n) - n. - _R. J. Mathar_, Sep 19 2010
%F A097508 a(n) = floor((sqrt(2)-1)*n). [Celaya-Ruskey] - _N. J. A. Sloane_, Nov 14 2013
%F A097508 a(2*n) = 2*a(n) + A197879(n). - _Robert Israel_, Aug 21 2014
%p A097508 seq(floor(n*sqrt(2)) - n, n = 0 .. 100); # _Robert Israel_, Aug 21 2014
%t A097508 Table[Floor[n Sqrt[2]]-n,{n,0,80}] (* _Harvey P. Dale_, Dec 04 2014 *)
%o A097508 (PARI) a(n)=sqrtint(2*n^2)-n \\ _Charles R Greathouse IV_, Sep 02 2015
%o A097508 (Magma) [Floor(n*Sqrt(2)) - n: n in [0..100]]; // _G. C. Greubel_, Mar 27 2018
%Y A097508 Cf. A001951, A197879.
%K A097508 easy,nonn
%O A097508 0,6
%A A097508 _Odimar Fabeny_, Aug 26 2004
%E A097508 Extended by _R. J. Mathar_, Sep 19 2010
%E A097508 Definition edited by _Robert Israel_, Aug 21 2014
%E A097508 Name changed by _Michel Dekking_, Jul 01 2023