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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A187950 [nr+kr] - [nr] - [kr], where r = (1+sqrt(5))/2, k = 4, [.]=floor. 64
 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1 COMMENTS Suppose r is a positive irrational number and k is a positive integer, so that the sequence given by a(n) = [nr+kr] - [nr] - [kr] consists of zeros and ones (the fractional part of nr and kr being < 1). Let b(n) = (position of the n-th 0) and c(n) = (position of the n-th 1), so that b and c are a complementary pair of sequences. Examples of a, b, c using r = (1+sqrt(5))/2: k = 1: a = A005614 (infinite Fibonacci word), b = A001950 (upper Wythoff sequence), c = A000201 (lower Wythoff sequence); k = 2: a = A123740, b = A187485, c = A003623; k = 3: a = A187944, b = A101864, c = A187945; k = 4: a = A187950, b = A187951, c = A187952 (the case considered here). Example using r = sqrt(2), k = 1: a = A159684, b = A003152, c = A003151. Returning to arbitrary positive irrational r, let s(n) = [nr+r] - [nr] - [r], this being a(n) when k = 1. For k >= 2, the sequence a(n) = [nr+kr] - [nr] - [kr] is a shifted sum of shifted copies of s: a(n) = s(n) + s(n+1) + ... + s(n+k-1) - (constant). It would be more natural to start the sequence with offset n = 0. -- A periodic pattern of length 21 seems to appear at n = 35 but it remains only up to n = 105. - M. F. Hasler, Oct 12 2017 From Michel Dekking, Apr 02 2020: (Start) This sequence is a morphic sequence, i.e., the letter-to-letter projection lambda of the fixed point of a morphism. The fixed point is A276757=1,2,3,4,5,1,2,3,1,2,3..., the fixed point of the 4-block Fibonacci substitution on the alphabet {1,2,3,4,5} given by 1->12, 2->3, 3-> 45, 4->12, 5->3. The letter-to-letter projection lambda is given by 1->1, 2->0, 3->1, 4->0, 5->0. The reason that this works, is that the words of length 4 in the infinite Fibonacci word A003849 = 0100101001..., and their codings in the alphabet {1,2,3,4,5} are given by 0100 <-> 1, 1001 <-> 2, 0010 <-> 3, 0101 <-> 4, 1010 <-> 5. The difference sequence A014755 of the lower Wythoff sequence w = A000201, given by w(n) = [n*phi] is equal to the Fibonacci word on the alphabet {2,1} (modulo a minor offset problem). This gives that the difference between [(n+4)*phi] and [n*phi] is equal to the sum w(n)+w(n+1)+w(n+2)+w(n+3), which is 6 or 7. After subtracting [4r] = floor(4*phi) = 6, these sums are equal to a(n) = lambda(A276757(n)). (End) LINKS Chai Wah Wu, Table of n, a(n) for n = 1..10000 F. Michel Dekking, Morphisms, Symbolic Sequences, and Their Standard Forms, Journal of Integer Sequences, Vol. 19 (2016), Article 16.1.1. FORMULA a(n) = floor(nr+4r)-floor(nr)-6, where r = (1+sqrt(5))/2. a(n) = lambda(A276757(n)), where lambda(2) = lambda(4) = lambda(5) = 0, lambda(1) = lambda(3) = 1. - Michel Dekking, Apr 02 2020 EXAMPLE We get a = A187950, b = A187951, c = A189952 when r = (1+sqrt(5))/2 and k = 4: a......1..0..1..1..0..1..0..1..1..0..1..1..0..1... b......2..4..5..7..10..12.. (positions of 0 in a) c......1..3..6..8..9..11... (positions of 1 in a). As noted in Comments, a(n) = [nr+4r] - [nr] - [4r] is also obtained in another way: by adding left shifts of the infinite Fibonacci word s = A005614 and then down shifting: s(n)......1..0..1..1..0..1..0..1..1..0..1..1..0..1... s(n+1)....0..1..1..0..1..0..1..1..0..1..1..0..1..0... s(n+2)....1..1..0..1..0..1..1..0..1..1..0..1..0..1... s(n+3)....1..0..1..0..1..1..0..1..1..0..1..0..1..1... sum.......3..2..3..2..2..3..2..3..3..2..3..2..2..3... sum-2.....1..0..1..0..0..1..0..1..1..0..1..0..0..1... [Corrected by M. F. Hasler, Oct 12 2017] MATHEMATICA r = (1+5^(1/2))/2; A187950 = Table[Floor[(n+4)r]-Floor[n*r]-6, {n, 1, 220}] A187951 = Flatten[Position[a, 0]] ; A187952 = Flatten[Position[a, 1]] PROG (PARI) a(n)=my(phi=(1+sqrt(5))/2, np=n*phi); floor(np-floor(np)+4*phi-6) \\ Charles R Greathouse IV, Jun 16 2011 (Python) from __future__ import division from gmpy2 import isqrt def A187950(n): return int((isqrt(5*(n+4)**2)+n)//2 -(isqrt(5*n**2)+n)//2 - 4) # Chai Wah Wu, Oct 07 2016 (PARI) A187950(n)=(sqrtint(5*(n+4)^2)+n)\2-(sqrtint(5*n^2)+n)\2-4 \\ M. F. Hasler, Oct 12 2017 CROSSREFS Cf. A005614, A001950, A000201, A187951, A187952, A003849, A014755, A276757. Sequence in context: A286752 A320167 A030658 * A112539 A104104 A188467 Adjacent sequences: A187947 A187948 A187949 * A187951 A187952 A187953 KEYWORD nonn AUTHOR Clark Kimberling, Mar 16 2011 EXTENSIONS Edited by M. F. Hasler, Oct 12 2017 STATUS approved

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.

Last modified July 23 18:05 EDT 2024. Contains 374553 sequences. (Running on oeis4.)