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!)
A187950 [nr+kr] - [nr] - [kr], where r = (1+sqrt(5))/2, k = 4, [.]=floor. 64

%I #37 Apr 02 2020 11:13:54

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

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

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

%N [nr+kr] - [nr] - [kr], where r = (1+sqrt(5))/2, k = 4, [.]=floor.

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

%C Examples of a, b, c using r = (1+sqrt(5))/2:

%C k = 1: a = A005614 (infinite Fibonacci word),

%C b = A001950 (upper Wythoff sequence),

%C c = A000201 (lower Wythoff sequence);

%C k = 2: a = A123740, b = A187485, c = A003623;

%C k = 3: a = A187944, b = A101864, c = A187945;

%C k = 4: a = A187950, b = A187951, c = A187952 (the case considered here).

%C Example using r = sqrt(2), k = 1: a = A159684, b = A003152, c = A003151.

%C 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).

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

%C From _Michel Dekking_, Apr 02 2020: (Start)

%C This sequence is a morphic sequence, i.e., the letter-to-letter projection lambda of the fixed point of a morphism.

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

%C 1->12, 2->3, 3-> 45, 4->12, 5->3.

%C The letter-to-letter projection lambda is given by

%C 1->1, 2->0, 3->1, 4->0, 5->0.

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

%C 0100 <-> 1, 1001 <-> 2, 0010 <-> 3, 0101 <-> 4, 1010 <-> 5.

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

%H Chai Wah Wu, <a href="/A187950/b187950.txt">Table of n, a(n) for n = 1..10000</a>

%H F. Michel Dekking, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Dekking/dekk4.html">Morphisms, Symbolic Sequences, and Their Standard Forms</a>, Journal of Integer Sequences, Vol. 19 (2016), Article 16.1.1.

%F a(n) = floor(nr+4r)-floor(nr)-6, where r = (1+sqrt(5))/2.

%F a(n) = lambda(A276757(n)), where lambda(2) = lambda(4) = lambda(5) = 0, lambda(1) = lambda(3) = 1. - _Michel Dekking_, Apr 02 2020

%e We get a = A187950, b = A187951, c = A189952 when r = (1+sqrt(5))/2 and k = 4:

%e a......1..0..1..1..0..1..0..1..1..0..1..1..0..1...

%e b......2..4..5..7..10..12.. (positions of 0 in a)

%e c......1..3..6..8..9..11... (positions of 1 in a).

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

%e s(n)......1..0..1..1..0..1..0..1..1..0..1..1..0..1...

%e s(n+1)....0..1..1..0..1..0..1..1..0..1..1..0..1..0...

%e s(n+2)....1..1..0..1..0..1..1..0..1..1..0..1..0..1...

%e s(n+3)....1..0..1..0..1..1..0..1..1..0..1..0..1..1...

%e sum.......3..2..3..2..2..3..2..3..3..2..3..2..2..3...

%e sum-2.....1..0..1..0..0..1..0..1..1..0..1..0..0..1... [Corrected by _M. F. Hasler_, Oct 12 2017]

%t r = (1+5^(1/2))/2;

%t A187950 = Table[Floor[(n+4)r]-Floor[n*r]-6, {n,1,220}]

%t A187951 = Flatten[Position[a,0]] ; A187952 = Flatten[Position[a,1]]

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

%o (Python)

%o from __future__ import division

%o from gmpy2 import isqrt

%o def A187950(n):

%o return int((isqrt(5*(n+4)**2)+n)//2 -(isqrt(5*n**2)+n)//2 - 4) # _Chai Wah Wu_, Oct 07 2016

%o (PARI) A187950(n)=(sqrtint(5*(n+4)^2)+n)\2-(sqrtint(5*n^2)+n)\2-4 \\ _M. F. Hasler_, Oct 12 2017

%Y Cf. A005614, A001950, A000201, A187951, A187952, A003849, A014755, A276757.

%K nonn

%O 1

%A _Clark Kimberling_, Mar 16 2011

%E Edited by _M. F. Hasler_, Oct 12 2017

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 May 10 13:53 EDT 2024. Contains 372387 sequences. (Running on oeis4.)