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 A080764 #64 May 19 2025 23:45:40 %S A080764 1,1,0,1,1,0,1,1,1,0,1,1,0,1,1,1,0,1,1,0,1,1,0,1,1,1,0,1,1,0,1,1,1,0, %T A080764 1,1,0,1,1,0,1,1,1,0,1,1,0,1,1,1,0,1,1,0,1,1,1,0,1,1,0,1,1,0,1,1,1,0, %U A080764 1,1,0,1,1,1,0,1,1,0,1,1,0,1,1,1,0,1,1,0,1,1,1,0,1,1,0,1,1,1,0,1,1,0,1,1,0 %N A080764 First differences of A049472, floor(n/sqrt(2)). %C A080764 Fixed point of the morphism 0->1, 1->110. - _Benoit Cloitre_, May 31 2004 %C A080764 As binary constant 0.1101101110110... = 0.85826765646... (A119812), see Fxtbook link. - _Joerg Arndt_, May 15 2011 %C A080764 Characteristic word with slope 1/sqrt(2) [see J. L. Ramirez et al.]. - _R. J. Mathar_, Jul 09 2013 %C A080764 From _Peter Bala_, Nov 22 2013: (Start) %C A080764 Sturmian word: equals the limit word S(infinity) where S(0) = 0, S(1) = 1 and for n >= 1, S(n+1) = S(n)S(n)S(n-1). %C A080764 More generally, for k = 0,1,2,..., we can define a sequence of words S_k(n) by S_k(0) = 0, S_k(1) = 0...01 (k 0's) and for n >= 1, S_k(n+1) = S_k(n)S_k(n)S_k(n-1). Then the limit word S_k(infinity) is a Sturmian word whose terms are given by a(n) = floor((n + 2)/(k + sqrt(2))) - floor((n + 1)/(k + sqrt(2))). %C A080764 This sequence corresponds to the case k = 0. See A159684 (case k = 1) and A171588 (case k = 2). Compare with the Fibonacci words A005614, A221150, A221151 and A221152. See also A230901. (End) %C A080764 For n > 0: a(A001951(n)) = 1, a(A001952(n)) = 0. - _Reinhard Zumkeller_, Jul 03 2015 %C A080764 Binary complement of the Pell word A171588. - _Michel Dekking_, Feb 22 2018 %H A080764 Reinhard Zumkeller, <a href="/A080764/b080764.txt">Table of n, a(n) for n = 0..10000</a> %H A080764 Joerg Arndt, <a href="http://www.jjj.de/fxt/#fxtbook">Matters Computational (The Fxtbook)</a>, section 38.12, pp. 757-758. %H A080764 Wikipedia, <a href="http://en.wikipedia.org/wiki/Sturmian_word">Sturmian word</a> %H A080764 <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a> %F A080764 a(n) = floor((n+2)*sqrt(2)/2) - floor((n+1)*sqrt(2)/2). %F A080764 a(n) = A188295(n+2) for all n in Z. - _Michael Somos_, Aug 19 2018 %e A080764 From _Peter Bala_, Nov 22 2013: (Start) %e A080764 The first few Sturmian words S(n) are %e A080764 S(0) = 0 %e A080764 S(1) = 1 %e A080764 S(2) = 110 %e A080764 S(3) = 110 110 1 %e A080764 S(4) = 1101101 1101101 110 %e A080764 S(5) = 11011011101101110 11011011101101110 1101101 %e A080764 The lengths of the words are [1, 1, 3, 7, 17, 41, ...] = A001333. (End) %p A080764 A080764 := proc(n) %p A080764 alpha := 1/sqrt(2) ; %p A080764 floor((n+2)*alpha)-floor((n+1)*alpha) ; %p A080764 end proc: # _R. J. Mathar_, Jul 09 2013 %t A080764 Nest[ Flatten[ # /. {0 -> 1, 1 -> {1, 1, 0}}] &, {1}, 7] (* _Robert G. Wilson v_, Apr 16 2005 *) %t A080764 NestList[ Flatten[ # /. {0 -> {1}, 1 -> {1, 0, 1}}] &, {1}, 5] // Flatten (* or *) %t A080764 t = Table[Floor[n/Sqrt[2]], {n, 111}]; Drop[t, 1] - Drop[t, -1] (* _Robert G. Wilson v_, Nov 03 2005 *) %t A080764 a[ n_] := With[{m = n + 1}, Floor[(m + 1) / Sqrt[2]] - Floor[m / Sqrt[2]]]; (* _Michael Somos_, Aug 19 2018 *) %o A080764 (Haskell) %o A080764 a080764 n = a080764_list !! n %o A080764 a080764_list = tail $ zipWith (-) (tail a049472_list) a049472_list %o A080764 -- _Reinhard Zumkeller_, Jul 03 2015 %o A080764 (PARI) {a(n) = n++; my(k = sqrtint(n*n\2)); n*(n+2) > 2*k*(k+2)}; /* _Michael Somos_, Aug 19 2018 */ %o A080764 (Python) %o A080764 from math import isqrt %o A080764 def A080764(n): return (isqrt((m:=(n+2)**2)<<1)>>1)-(isqrt(m-(n<<1)-3<<1)>>1) # _Chai Wah Wu_, May 19 2025 %Y A080764 Cf. A005614, A159684, A171588, A221150, A221151, A221152, A230901. %Y A080764 Cf. A049472, A001951, A001952, A188295. %K A080764 nonn,easy %O A080764 0,1 %A A080764 _Matthew Vandermast_, Mar 25 2003