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!)
A197879 Parity of floor(n*sqrt(8)). 6
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, 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, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1

COMMENTS

Any periodicity?

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

The term a(70) is the first term where this sequence differs from A187976. - Michel Dekking, Jan 24 2017

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

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

LINKS

Clark Kimberling, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = 2*<n*sqrt(2)> - <2*n*sqrt(2)>, where <> denotes fractional part. - Clark Kimberling, Sep 08 2019

MATHEMATICA

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

Table[Floor[2 n Sqrt[2]] - 2 Floor[n*Sqrt[2]], {n, 1, 200}]  (* Clark Kimberling, Sep 09 2019 *)

PROG

(PARI) a(n)=sqrtint(8*n^2)%2 \\ Charles R Greathouse IV, Oct 25 2011

(MAGMA) [Floor(Sqrt(8*n^2)) mod (2): n in [1..100]]; // Vincenzo Librandi, Jul 14 2019

CROSSREFS

Parity of A022842 and A197878.

Cf. A086843, A086844, A196468.

Sequence in context: A267188 A154104 A187976 * A296657 A082848 A078588

Adjacent sequences:  A197876 A197877 A197878 * A197880 A197881 A197882

KEYWORD

nonn,easy

AUTHOR

Zak Seidov, Oct 18 2011

STATUS

approved

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 September 25 15:27 EDT 2021. Contains 347658 sequences. (Running on oeis4.)