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

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

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..1...

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

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

MATHEMATICA

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

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

Flatten[Position[a, 0] ]   (*A187951*)

Flatten[Position[a, 1] ]   (*A187952*)

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

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

AUTHOR

Clark Kimberling, Mar 16 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified June 28 03:08 EDT 2017. Contains 288813 sequences.