login
This site is supported by donations 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
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

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000

FORMULA

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

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.

Sequence in context: A190227 A266611 A286752 * A188467 A284471 A286726

Adjacent sequences:  A187947 A187948 A187949 * A187951 A187952 A187953

KEYWORD

nonn,changed

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified October 16 17:56 EDT 2017. Contains 293441 sequences.