login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A083035 a(n) = floor(sqrt(2)*n)-2*floor(n/sqrt(2)). 14

%I #31 Dec 10 2022 16:52:17

%S 1,0,0,1,1,0,1,1,0,0,1,0,0,1,1,0,0,1,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,

%T 1,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,1,0,0,1,1,0,0,1,0,0,1,1,0,1,1,0,0,

%U 1,0,0,1,1,0,0,1,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,1,0,0,1,1,0,0,1,0,0,1,1,0

%N a(n) = floor(sqrt(2)*n)-2*floor(n/sqrt(2)).

%H Charles R Greathouse IV, <a href="/A083035/b083035.txt">Table of n, a(n) for n = 1..10000</a>

%H Benoit Cloitre, <a href="/A083035/a083035.png">Fractal walk starting at (0,0) with step of unit length turning right if a(n)=0 and left otherwise for n=1 up to 10^6</a>

%H Sela Fried, <a href="https://1827e8b7-4851-4c57-a858-cf14462e53e9.filesusr.com/ugd/cab532_eb2971323b9a48cb862963a8835db4ee.pdf">The beauty of Beatty sequences</a>.

%F a(n) = floor(n*sqrt(2)) mod 2. - _T. D. Noe_, Oct 11 2006

%t Table[Floor[Sqrt[2]n]-2Floor[n/Sqrt[2]],{n,120}] (* _Harvey P. Dale_, Mar 08 2017 *)

%t Table[Mod[Floor[Sqrt[2] n], 2], {n, 120}] (* _IWABUCHI Yu(u)ki_, May 01 2020 *)

%o (PARI) a(n)=sqrtint(2*n^2)%2 \\ _Charles R Greathouse IV_, Oct 14 2013

%Y Cf. A083036, A083037, A083038, A001951 (floor(n*sqrt(2))).

%K nonn,easy

%O 1,1

%A _Benoit Cloitre_, Apr 17 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 10:08 EDT 2024. Contains 372332 sequences. (Running on oeis4.)