# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a197879 Showing 1-1 of 1 %I A197879 #53 Sep 08 2022 08:45:59 %S A197879 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 A197879 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 A197879 1,1,0,1,0,1,0,0,1,0,1,0,1,1,0,1,0,1,0 %N A197879 Parity of floor(n*sqrt(8)). %C A197879 Any periodicity? %C A197879 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 A197879 The term a(70) is the first term where this sequence differs from A187976. - _Michel Dekking_, Jan 24 2017 %C A197879 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 A197879 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* - , 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* - <2*n*r>, so that a(n) = 1 if and only if > 1/2. The proof follows as in the first sentence of A. Cicuttin's comment. - _Clark Kimberling_, Sep 08 2019 %H A197879 Clark Kimberling, Table of n, a(n) for n = 1..10000 %F A197879 a(n) = 2* - <2*n*sqrt(2)>, where <> denotes fractional part. - _Clark Kimberling_, Sep 08 2019 %t A197879 Table[Mod[Floor[Sqrt[8]*n], 2], {n, 200}] %t A197879 Table[Floor[2 n Sqrt[2]] - 2 Floor[n*Sqrt[2]], {n, 1, 200}] (* _Clark Kimberling_, Sep 09 2019 *) %o A197879 (PARI) a(n)=sqrtint(8*n^2)%2 \\ _Charles R Greathouse IV_, Oct 25 2011 %o A197879 (Magma) [Floor(Sqrt(8*n^2)) mod (2): n in [1..100]]; // _Vincenzo Librandi_, Jul 14 2019 %Y A197879 Parity of A022842 and A197878. %Y A197879 Cf. A086843, A086844, A196468. %K A197879 nonn,easy %O A197879 1 %A A197879 _Zak Seidov_, Oct 18 2011 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE