login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

%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>

%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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 12:45 EDT 2021. Contains 343037 sequences. (Running on oeis4.)