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!)
A197879 Parity of floor(n*sqrt(8)). 6

%I #53 Sep 08 2022 08:45:59

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

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

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

%N Parity of floor(n*sqrt(8)).

%C Any periodicity?

%C The answer is: no. The sequence (a(n)) is a non-periodic morphic sequence. As shown in A197878, the sequence of first differences of (floor(n*sqrt(8))) with offset 0 is the unique fixed point of the substitution 4->45555, 5->455555. This implies that we can get the parity sequence by defining the substitution 1->14343, 2->23434, 3->234343, 4->143434, giving a fixed point (b(n)) = 1,4,3,4,3,1,4,3,4,3,4,..., and then applying the letter-to-letter map pi: 1->0, 3->0, 2->1, 4->1. One obtains pi(b) = a. - _Michel Dekking_, Jan 24 2017

%C The term a(70) is the first term where this sequence differs from A187976. - _Michel Dekking_, Jan 24 2017

%C If the fractional part of sqrt(2)*n > 1/2 then a(n) = 1, otherwise a(n) = 0. It is possible to see from this that since 5/4 < sqrt(2) < 7/4, there are no more than two consecutive 0's or 1's (a similar feature is found in A272532 and conjectured in A272170). The sequence looks quasiperiodic and its Fourier spectrum seems to present a maximum component at a frequency which converges to about 0.828 of the maximum frequency. - _Andres Cicuttin_, Jul 09 2019

%C Suppose that r is a positive irrational number and k >= 2. Let F(n) = F(n,r,k) = floor(k*n*r) - k*floor(n*r) = k*<n*r> - <n*k*r>, an integer in {0,1,...,k-1}, where <> denotes fractional part. Although F(n)/n -> k the sequence F(n)-k*n appears to be unbounded. For r = sqrt(2) and k = 2, we have F(n) = a(n). Proof: a(n) = 2*<n*r> - <2*n*r>, so that a(n) = 1 if and only if <r*n> > 1/2. The proof follows as in the first sentence of A. Cicuttin's comment. - _Clark Kimberling_, Sep 08 2019

%H Clark Kimberling, <a href="/A197879/b197879.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 2*<n*sqrt(2)> - <2*n*sqrt(2)>, where <> denotes fractional part. - _Clark Kimberling_, Sep 08 2019

%t Table[Mod[Floor[Sqrt[8]*n], 2], {n, 200}]

%t Table[Floor[2 n Sqrt[2]] - 2 Floor[n*Sqrt[2]], {n, 1, 200}] (* _Clark Kimberling_, Sep 09 2019 *)

%o (PARI) a(n)=sqrtint(8*n^2)%2 \\ _Charles R Greathouse IV_, Oct 25 2011

%o (Magma) [Floor(Sqrt(8*n^2)) mod (2): n in [1..100]]; // _Vincenzo Librandi_, Jul 14 2019

%Y Parity of A022842 and A197878.

%Y Cf. A086843, A086844, A196468.

%K nonn,easy

%O 1

%A _Zak Seidov_, Oct 18 2011

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 April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)