VOOZH about

URL: https://oeis.org/A188037

⇱ A188037 - OEIS


login
A188037
a(n) = floor(n*r) - 1 - floor((n-1)*r), where r = sqrt(2).
16
0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0
OFFSET
1
COMMENTS
Is this A159684 with an additional 0 in front? - R. J. Mathar, Mar 20 2011
The answer is yes, since it follows right from the definitions of the sequences that (a(n)) is equal to A159684 with a different offset. - Michel Dekking, Jan 31 2017
Sturmian word of slope sqrt(2)-1. - Philippe Schnoebelen, Aug 25 2025
LINKS
Heinz H. Bauschke, Minh N. Dao, and Scott B. Lindstrom, The Douglas-Rachford algorithm for a hyperplane and a doubleton, arXiv:1804.08880 [math.OC], 2018.
N. J. A. Sloane, Families of Essentially Identical Sequences, Mar 24 2021 (Includes this sequence)
FORMULA
a(n) = floor(n*r) - floor(r) - floor(n*r - r), where r = sqrt(2).
MATHEMATICA
r=2^(1/2); k=1;
t=Table[Floor[n*r]-Floor[(n-k)*r]-Floor[k*r], {n, 1, 220}]
Table[Floor[n Sqrt[2]] - Floor[Sqrt[2]] - Floor[n Sqrt[2] - Sqrt[2]], {n, 100}] (* Vincenzo Librandi, Jan 31 2017 *)
PROG
(Magma) [Floor(n*Sqrt(2))-Floor(Sqrt(2))-Floor(n*Sqrt(2)- Sqrt(2)): n in [1..100]]; // Vincenzo Librandi, Jan 31 2017
(PARI) a(n) = floor(n*sqrt(2))-1-floor((n-1)*sqrt(2)) \\ Felix Fröhlich, Jan 31 2017
(Python)
from math import isqrt
def A188037(n): return isqrt(n**2<<1)-1-isqrt((n-1)**2<<1) # Chai Wah Wu, May 24 2025
CROSSREFS
A159684 is an essentially identical sequence.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A003151 as the parent: A003151, A001951, A001952, A003152, A006337, A080763, A082844 (conjectured), A097509, A159684, A188037, A245219 (conjectured), A276862. - N. J. A. Sloane, Mar 09 2021
Sequence in context: A289074 A289242 A346218 * A144598 A144606 A060510
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 19 2011
STATUS
approved